You are here

public function PublishCacheflush::execute in CacheFlush 8

Executes the plugin.

Overrides ExecutableInterface::execute

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

File

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

Class

PublishCacheflush
Publishes a cacheflush.

Namespace

Drupal\cacheflush_ui\Plugin\Action

Code

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