function CKEditorPluginBase::getModulePath

Gets the Drupal-root relative installation directory of a module.

Parameters

string $module_name: The machine name of the module.

Return value

string The module installation directory.

Throws

\InvalidArgumentException If there is no extension with the supplied machine name.

See also

\Drupal\Core\Extension\ExtensionList::getPath()

5 calls to CKEditorPluginBase::getModulePath()
DrupalImage::getButtons in core/modules/ckeditor/src/Plugin/CKEditorPlugin/DrupalImage.php
Returns the buttons that this plugin provides, along with metadata.
DrupalImage::getFile in core/modules/ckeditor/src/Plugin/CKEditorPlugin/DrupalImage.php
Returns the Drupal root-relative file path to the plugin JavaScript file.
DrupalLink::getButtons in core/modules/ckeditor/src/Plugin/CKEditorPlugin/DrupalLink.php
Returns the buttons that this plugin provides, along with metadata.
DrupalLink::getFile in core/modules/ckeditor/src/Plugin/CKEditorPlugin/DrupalLink.php
Returns the Drupal root-relative file path to the plugin JavaScript file.
Language::getCssFiles in core/modules/ckeditor/src/Plugin/CKEditorPlugin/Language.php
Retrieves enabled plugins' iframe instance CSS files.

File

core/modules/ckeditor/src/CKEditorPluginBase.php, line 68

Class

CKEditorPluginBase
Defines a base CKEditor plugin implementation.

Namespace

Drupal\ckeditor

Code

protected function getModulePath(string $module_name) : string {
    return $this->getModuleList()
        ->getPath($module_name);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.