You are here

public function UnpublishCacheflush::execute in CacheFlush 8

Executes the plugin.

Overrides ExecutableInterface::execute

1 call to UnpublishCacheflush::execute()
UnpublishCacheflush::executeMultiple in modules/cacheflush_ui/src/Plugin/Action/UnpublishCacheflush.php
Executes the plugin for an array of objects.

File

modules/cacheflush_ui/src/Plugin/Action/UnpublishCacheflush.php, line 83

Class

UnpublishCacheflush
Unpublishes a cacheflush.

Namespace

Drupal\cacheflush_ui\Plugin\Action

Code

public function execute($entity = NULL) {
  $entity->status = CacheflushUIConstantsInterface::CACHEFLUSH_NOT_PUBLISHED;
  $entity
    ->save();
}