You are here

public function ComponentsInfo::getProtectedNamespaceExtensionInfo in Components! 8.2

Get info about the module/theme that owns the protected Twig namespace.

@internal

Parameters

string $namespace: The namespace to get the extension info about.

Return value

array Information about the protected Twig namespace's extension, including:

  • name: The friendly-name of the module/theme that owns the namespace.
  • type: The extension type: module, theme, or profile.
  • package: The package name the module is listed under or an empty string.

File

src/Template/ComponentsInfo.php, line 321

Class

ComponentsInfo
Loads info about components defined in themes or modules.

Namespace

Drupal\components\Template

Code

public function getProtectedNamespaceExtensionInfo(string $namespace) {
  $this
    ->init();
  return isset($this->protectedNamespaces[$namespace]) ? $this->protectedNamespaces[$namespace] : [
    'name' => '',
    'type' => '',
    'package' => '',
  ];
}