You are here

public function ComponentsInfo::getProtectedNamespaces in Components! 8.2

Returns a list of default namespaces that should not be overridden.

The returned list is of default namespaces that are maintained by Drupal core and owned by individual modules or themes. By default, default namespaces cannot be overridden; a module or theme can opt-in to having their namespace altered by using their name in the components.namespaces key of their .info.yml or by setting the components.allow_default_namespace_reuse key in their .info.yml.

@internal

Return value

array List of protected namespaces.

File

src/Template/ComponentsInfo.php, line 344

Class

ComponentsInfo
Loads info about components defined in themes or modules.

Namespace

Drupal\components\Template

Code

public function getProtectedNamespaces() {
  $this
    ->init();
  return array_keys($this->protectedNamespaces);
}