public function ExtensionPathResolver::getPath in Drupal 9
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\ExtensionCode
public function getPath(string $type, string $name) : string {
return dirname($this
->getPathname($type, $name));
}