public function AddMenuCacheflush::execute in CacheFlush 8
Executes the plugin.
Overrides ExecutableInterface::execute
1 call to AddMenuCacheflush::execute()
- AddMenuCacheflush::executeMultiple in modules/
cacheflush_ui/ src/ Plugin/ Action/ AddMenuCacheflush.php - Executes the plugin for an array of objects.
File
- modules/
cacheflush_ui/ src/ Plugin/ Action/ AddMenuCacheflush.php, line 83
Class
- AddMenuCacheflush
- Add menu item.
Namespace
Drupal\cacheflush_ui\Plugin\ActionCode
public function execute($entity = NULL) {
$entity->menu = CacheflushUIConstantsInterface::CACHEFLUSH_MENU;
$entity
->save();
}