Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. HelpTopicSection.php

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\HelpSection

Code

protected function getCacheMetadata() {
    if (!isset($this->cacheableMetadata)) {
        $this->cacheableMetadata = new CacheableMetadata();
        foreach ($this->getPlugins() as $plugin) {
            $this->cacheableMetadata
                ->addCacheableDependency($plugin);
        }
    }
    return $this->cacheableMetadata;
}
RSS feed
Powered by Drupal