public function CachePluginBase::getRowCacheTags in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/modules/views/src/Plugin/views/cache/CachePluginBase.php \Drupal\views\Plugin\views\cache\CachePluginBase::getRowCacheTags()
Returns the row cache tags.
Parameters
ResultRow $row: A result row.
Return value
string[] The row cache tags.
1 call to CachePluginBase::getRowCacheTags()
- CachePluginBase::getRowId in core/
modules/ views/ src/ Plugin/ views/ cache/ CachePluginBase.php - Returns a unique identifier for the specified row.
File
- core/
modules/ views/ src/ Plugin/ views/ cache/ CachePluginBase.php, line 306 - Contains \Drupal\views\Plugin\views\cache\CachePluginBase.
Class
- CachePluginBase
- The base plugin to handle caching.
Namespace
Drupal\views\Plugin\views\cacheCode
public function getRowCacheTags(ResultRow $row) {
$tags = !empty($row->_entity) ? $row->_entity
->getCacheTags() : [];
if (!empty($row->_relationship_entities)) {
foreach ($row->_relationship_entities as $entity) {
$tags = Cache::mergeTags($tags, $entity
->getCacheTags());
}
}
return $tags;
}