function NodeCacheTagsTest::getAdditionalCacheTagsForEntity
Same name and namespace in other branches
- 11.x core/modules/node/tests/src/Functional/NodeCacheTagsTest.php \Drupal\Tests\node\Functional\NodeCacheTagsTest::getAdditionalCacheTagsForEntity()
- 10 core/modules/node/tests/src/Functional/NodeCacheTagsTest.php \Drupal\Tests\node\Functional\NodeCacheTagsTest::getAdditionalCacheTagsForEntity()
- 9 core/modules/node/tests/src/Functional/NodeCacheTagsTest.php \Drupal\Tests\node\Functional\NodeCacheTagsTest::getAdditionalCacheTagsForEntity()
- main core/modules/node/tests/src/Functional/NodeCacheTagsTest.php \Drupal\Tests\node\Functional\NodeCacheTagsTest::getAdditionalCacheTagsForEntity()
Each node must have an author.
Parameters
\Drupal\Core\Entity\EntityInterface $entity: The entity to be tested, as created by createEntity().
Return value
array An array of the additional cache tags.
Overrides EntityCacheTagsTestBase::getAdditionalCacheTagsForEntity
File
-
core/
modules/ node/ tests/ src/ Functional/ NodeCacheTagsTest.php, line 69
Class
- NodeCacheTagsTest
- Tests the Node entity's cache tags.
Namespace
Drupal\Tests\node\FunctionalCode
protected function getAdditionalCacheTagsForEntity(EntityInterface $node) {
return [
'user:' . $node->getOwnerId(),
'user_view',
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.