function HelpTopicSection::getCacheMetadata
Gets the merged CacheableMetadata for all the top level help topic plugins.
Return value
\Drupal\Core\Cache\CacheableMetadata The merged CacheableMetadata for all the top level help topic plugins.
File
-
core/
modules/ help/ src/ Plugin/ HelpSection/ HelpTopicSection.php, line 231
Class
- HelpTopicSection
- Provides the help topics list section for the help page.
Namespace
Drupal\help\Plugin\HelpSectionCode
protected function getCacheMetadata() {
if (!isset($this->cacheableMetadata)) {
$this->cacheableMetadata = new CacheableMetadata();
foreach ($this->getPlugins() as $plugin) {
$this->cacheableMetadata
->addCacheableDependency($plugin);
}
}
return $this->cacheableMetadata;
}