You are here

public function ExtensionList::setPathname in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Extension/ExtensionList.php \Drupal\Core\Extension\ExtensionList::setPathname()

Sets the pathname for an extension.

This method is used in the Drupal bootstrapping phase, when the extension system is not fully initialized, to manually set locations of modules and profiles needed to complete bootstrapping.

It is not recommended to call this method except in those rare cases.

@internal

Parameters

string $extension_name: The machine name of the extension.

string $pathname: The pathname of the extension which is to be set explicitly rather than by consulting the dynamic extension listing.

See also

::getPathname

1 call to ExtensionList::setPathname()
ModuleExtensionList::__construct in core/lib/Drupal/Core/Extension/ModuleExtensionList.php
Constructs a new ModuleExtensionList instance.

File

core/lib/Drupal/Core/Extension/ExtensionList.php, line 467

Class

ExtensionList
Provides available extensions.

Namespace

Drupal\Core\Extension

Code

public function setPathname($extension_name, $pathname) {
  $this->addedPathNames[$extension_name] = $pathname;
}