function _ckeditor_codemirror_get_library_path in CKEditor CodeMirror 8.2
Same name and namespace in other branches
- 8 ckeditor_codemirror.module \_ckeditor_codemirror_get_library_path()
Gets the path of a CKEditor CodeMirror library.
Return value
bool|string The path to the specified library or FALSE if the library wasn't found.
6 calls to _ckeditor_codemirror_get_library_path()
- CkeditorCodeMirrorBasicTest::testCheckStatusReportPage in tests/
src/ Functional/ CkeditorCodeMirrorBasicTest.php - Check the library status on "Status report" page.
- CkeditorCodeMirrorBasicTest::testEnableCkeditorCodeMirrorPlugin in tests/
src/ Functional/ CkeditorCodeMirrorBasicTest.php - Enable CKEditor CodeMirror plugin.
- ckeditor_codemirror_requirements in ./
ckeditor_codemirror.install - Implements hook_requirements().
- CodeMirror::getFile in src/
Plugin/ CKEditorPlugin/ CodeMirror.php - Returns the Drupal root-relative file path to the plugin JavaScript file.
- CodeMirror::settingsForm in src/
Plugin/ CKEditorPlugin/ CodeMirror.php - Returns a settings form to configure this CKEditor plugin.
File
- ./
ckeditor_codemirror.module, line 40 - Main code for CKEditor CodeMirror module.
Code
function _ckeditor_codemirror_get_library_path() {
$library_names = [
// README.txt say to use 'ckeditor_codemirror'.
'ckeditor_codemirror',
// Old README.txt used 'ckeditor-codemirror'.
'ckeditor-codemirror',
// The Webform module is using 'ckeditor.codemirror'.
'ckeditor.codemirror',
];
foreach ($library_names as $library_name) {
if (file_exists('libraries/' . $library_name)) {
return 'libraries/' . $library_name;
}
}
return FALSE;
}