protected function HelpTopicSection::getCacheMetadata in Drupal 10
Same name and namespace in other branches
- 8 core/modules/help_topics/src/Plugin/HelpSection/HelpTopicSection.php \Drupal\help_topics\Plugin\HelpSection\HelpTopicSection::getCacheMetadata()
- 9 core/modules/help_topics/src/Plugin/HelpSection/HelpTopicSection.php \Drupal\help_topics\Plugin\HelpSection\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_topics/ src/ Plugin/ HelpSection/ HelpTopicSection.php, line 273
Class
- HelpTopicSection
- Provides the help topics list section for the help page.
Namespace
Drupal\help_topics\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;
}