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

Breadcrumb

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

function HelpTopicTwigLoader::addExtension

Adds an extensions help_topics directory to the Twig loader.

Parameters

$path: The path to the extension.

1 call to HelpTopicTwigLoader::addExtension()
HelpTopicTwigLoader::__construct in core/modules/help/src/HelpTopicTwigLoader.php
Constructs a new HelpTopicTwigLoader object.

File

core/modules/help/src/HelpTopicTwigLoader.php, line 59

Class

HelpTopicTwigLoader
Loads help topic Twig files from the filesystem.

Namespace

Drupal\help

Code

protected function addExtension($path) {
    $path .= DIRECTORY_SEPARATOR . 'help_topics';
    if (is_dir($path)) {
        $this->cache = $this->errorCache = [];
        $this->paths[self::MAIN_NAMESPACE][] = rtrim($path, '/\\');
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal