public function EditTab::getCacheTags in Workbench Moderation 8.2
Same name and namespace in other branches
- 8 src/Plugin/Menu/EditTab.php \Drupal\workbench_moderation\Plugin\Menu\EditTab::getCacheTags()
The cache tags associated with this object.
When this object is modified, these cache tags will be invalidated.
Return value
string[] A set of cache tags.
Overrides LocalTaskDefault::getCacheTags
File
- src/
Plugin/ Menu/ EditTab.php, line 95
Class
- EditTab
- Defines a class for making the edit tab use 'Edit draft' or 'New draft'
Namespace
Drupal\workbench_moderation\Plugin\MenuCode
public function getCacheTags() {
// @todo write a test for this.
$tags = parent::getCacheTags();
// Tab changes if node or node-type is modified.
$tags = array_merge($tags, $this->entity
->getCacheTags());
$tags[] = $this->entity
->getEntityType()
->getBundleEntityType() . ':' . $this->entity
->bundle();
return $tags;
}