
| Current Path : /var/www/html1/bebop-gmuend.de1/modules/colordialog/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html1/bebop-gmuend.de1/modules/colordialog/colordialog.install |
<?php
/**
* @file
* Check requirements for the Color Dialog module.
*/
/**
* Implements hook_requirements().
*/
function colordialog_requirements($phase) {
$requirements = [];
$path = '/libraries/colordialog/plugin.js';
if (\Drupal::moduleHandler()->moduleExists('libraries')) {
$path = libraries_get_path('colordialog') . '/plugin.js';
}
$path = DRUPAL_ROOT . '/' . $path;
if (!file_exists($path)) {
$requirements['colordialog'] = [
'title' => t('CKEditor Color Dialog'),
'value' => t('Plugin not detected'),
'severity' => REQUIREMENT_ERROR,
'description' => t('CKEditor Color Dialog requires the plugin.js library.
Download the plugin from http://ckeditor.com/addon/colordialog at least
version 4.7.0, and place it in the libraries folder (/libraries/colordialog)'),
];
}
else {
$requirements['colordialog'] = [
'title' => t('CKEditor Color Dialog'),
'value' => t('Plugin detected'),
'severity' => REQUIREMENT_OK,
];
}
return $requirements;
}