function BlockContentCacheTagsTest::getAccessCacheContextsForEntity
Returns the access cache contexts for the tested entity.
Only list cache contexts that aren't part of the required cache contexts.
Parameters
\Drupal\Core\Entity\EntityInterface $entity: The entity to be tested, as created by createEntity().
Return value
string[] An array of the additional cache contexts.
Overrides EntityCacheTagsTestBase::getAccessCacheContextsForEntity
See also
\Drupal\block_content\BlockContentAccessControlHandler::checkAccess()
File
-
core/
modules/ block_content/ tests/ src/ Functional/ BlockContentCacheTagsTest.php, line 61
Class
- BlockContentCacheTagsTest
- Tests the Custom Block entity's cache tags.
Namespace
Drupal\Tests\block_content\FunctionalCode
protected function getAccessCacheContextsForEntity(EntityInterface $entity) {
return [];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.