function _environment_indicator_switcher_cache_tags in Environment Indicator 8.3
Same name and namespace in other branches
- 4.x environment_indicator.module \_environment_indicator_switcher_cache_tags()
Get the cache tags for the environment indicator switcher.
Return value
string[] The cache tags.
2 calls to _environment_indicator_switcher_cache_tags()
- environment_indicator_page_top in ./
environment_indicator.module - Implements hook_page_top().
- environment_indicator_toolbar in ./
environment_indicator.module - Implements hook_toolbar().
File
- ./
environment_indicator.module, line 334 - Module implementation file.
Code
function _environment_indicator_switcher_cache_tags() {
/* @var EnvironmentIndicator[] $environment_entities */
if (!($environment_entities = EnvironmentIndicator::loadMultiple())) {
return [];
}
$cache_tags = [];
foreach ($environment_entities as $entity) {
$cache_tags = Cache::mergeTags($cache_tags, $entity
->getCacheTags());
}
return $cache_tags;
}