W3cubDocs

/Drupal 8

public function Extension::__construct

public Extension::__construct($root, $type, $pathname, $filename = NULL)

Constructs a new Extension object.

Parameters

string $root: The app root.

string $type: The type of the extension; e.g., 'module'.

string $pathname: The relative path and filename of the extension's info file; e.g., 'core/modules/node/node.info.yml'.

string $filename: (optional) The filename of the main extension file; e.g., 'node.module'.

File

core/lib/Drupal/Core/Extension/Extension.php, line 60

Class

Extension
Defines an extension (file) object.

Namespace

Drupal\Core\Extension

Code

public function __construct($root, $type, $pathname, $filename = NULL) {
  $this->root = $root;
  $this->type = $type;
  $this->pathname = $pathname;
  $this->filename = $filename;
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Extension!Extension.php/function/Extension::__construct/8.1.x