private function A11yCheckerPlugin::librariesGetPath in CKEditor Accessibility Checker 8
Same name and namespace in other branches
- 2.0.x src/Plugin/CKEditorPlugin/A11yCheckerPlugin.php \Drupal\ckeditor_a11ychecker\Plugin\CKEditorPlugin\A11yCheckerPlugin::librariesGetPath()
Gets the path of a library.
Parameters
string $name: The machine name of a library to return the path for.
string $base_path: Whether to prefix the resulting path with base_path().
Return value
string The path to the specified library or FALSE if the library wasn't found.
2 calls to A11yCheckerPlugin::librariesGetPath()
- A11yCheckerPlugin::getButtons in src/
Plugin/ CKEditorPlugin/ A11yCheckerPlugin.php - Returns the buttons that this plugin provides, along with metadata.
- A11yCheckerPlugin::getFile in src/
Plugin/ CKEditorPlugin/ A11yCheckerPlugin.php - Returns the Drupal root-relative file path to the plugin JavaScript file.
File
- src/
Plugin/ CKEditorPlugin/ A11yCheckerPlugin.php, line 73
Class
- A11yCheckerPlugin
- Defines the "a11ychecker" plugin.
Namespace
Drupal\ckeditor_a11ychecker\Plugin\CKEditorPluginCode
private function librariesGetPath($name, $base_path = FALSE) {
$libraries =& drupal_static(__FUNCTION__);
if (!isset($libraries)) {
$libraries = $this
->getLibraryPaths();
}
$path = $base_path ? base_path() : '';
if (!isset($libraries[$name])) {
return FALSE;
}
else {
$path .= $libraries[$name];
}
return $path;
}