function ckeditor_bidi_requirements in CKEditor BiDi Buttons 8
Implements hook_requirements().
File
- ./
ckeditor_bidi.install, line 11 - Install, update and uninstall functions for the CKEditor BiDi Buttons module.
Code
function ckeditor_bidi_requirements($phase) {
$requirements = [];
$path = DRUPAL_ROOT . '/libraries/bidi/plugin.js';
if (\Drupal::moduleHandler()
->moduleExists('libraries')) {
$path = libraries_get_path('bidi') . '/plugin.js';
}
if (!file_exists($path)) {
$requirements['bidi_library'] = [
'title' => t('CKEditor\'s BiDi (Text Direction) plugin library is missing'),
'description' => t('"CKEditor BiDi Buttons" requires the plugin "BiDi (Text Direction)". <br>
Please go and download version 4.6.2 of the BiDi plugin at: <br>
http://ckeditor.com/addon/bidi <br>
Then, place it in /libraries directory of your installation.<br>
For more detailes see see README.txt of the module.'),
'severity' => REQUIREMENT_ERROR,
];
}
return $requirements;
}