public function BlockFieldTestAuthenticatedBlock::getCacheTags in Block field 8
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 ContextAwarePluginBase::getCacheTags
File
- tests/
modules/ block_field_test/ src/ Plugin/ Block/ BlockFieldTestAuthenticatedBlock.php, line 79
Class
- BlockFieldTestAuthenticatedBlock
- Provides a 'Block field test authenticated' block.
Namespace
Drupal\block_field_test\Plugin\BlockCode
public function getCacheTags() {
return [
'user:' . $this->currentUser
->id(),
];
}