
| Current Path : /var/www/html_old/abe/web/modules/contrib/colorbutton/ |
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/html_old/abe/web/modules/contrib/colorbutton/colorbutton.install |
<?php
/**
* @file
* Contains update functions for Color Button module.
*/
/**
* Implements hook_requirements().
*/
function colorbutton_requirements($phase) {
$requirements = [];
$path = 'libraries/colorbutton/plugin.js';
if (\Drupal::moduleHandler()->moduleExists('libraries')) {
$path = libraries_get_path('colorbutton') . '/plugin.js';
}
$path = DRUPAL_ROOT . '/' . $path;
if (!file_exists($path)) {
$requirements['colorbutton'] = [
'title' => t('Colorbutton library is missing'),
'value' => t('Plugin not detected'),
'severity' => REQUIREMENT_ERROR,
'description' => t('Colorbutton requires the plugin.js library.
Download the plugin from http://ckeditor.com/addon/colorbutton at least
version 4.5.6, and place it in the libraries folder
(/libraries/colorbutton)'),
];
}
else {
$requirements['colorbutton'] = [
'title' => t('CKEditor Colorbutton'),
'value' => t('Plugin detected'),
'severity' => REQUIREMENT_OK,
];
}
return $requirements;
}