You are here

public function Extension::getPath in Service Container 7

Same name and namespace in other branches
  1. 7.2 lib/Drupal/Core/Extension/Extension.php \Drupal\Core\Extension\Extension::getPath()

Returns the relative path of the extension.

Return value

string

2 calls to Extension::getPath()
Extension::getExtensionPathname in lib/Drupal/Core/Extension/Extension.php
Returns the relative path of the main extension file, if any.
Extension::load in lib/Drupal/Core/Extension/Extension.php
Loads the main extension file, if any.

File

lib/Drupal/Core/Extension/Extension.php, line 95
Contains \Drupal\Core\Extension\Extension.

Class

Extension
Defines an extension (file) object.

Namespace

Drupal\Core\Extension

Code

public function getPath() {
  return dirname($this->pathname);
}