Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ExtensionPathResolver.php

function ExtensionPathResolver::getPath

Gets the extension directory path.

Parameters

string $type: The extension type.

string $name: The extension name.

Return value

string The extension info file path.

Throws

\Drupal\Core\Extension\Exception\UnknownExtensionTypeException If the extension type is unknown.

\Drupal\Core\Extension\Exception\UnknownExtensionException If the extension is unknown.

File

core/lib/Drupal/Core/Extension/ExtensionPathResolver.php, line 84

Class

ExtensionPathResolver
Factory for getting extension lists by type.

Namespace

Drupal\Core\Extension

Code

public function getPath(string $type, string $name) : string {
    return dirname($this->getPathname($type, $name));
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal