fiu_ui.module in Fine Image Upload 8.2
General functions and hook implementations.
File
fiu_ui/fiu_ui.moduleView source
<?php
/**
* @file
* General functions and hook implementations.
*/
use Drupal\Core\Asset\AttachedAssetsInterface;
/**
* Implements hook_theme().
*/
function fiu_ui_theme() {
return [
'fiu_ui_preview' => [
'variables' => [
'data' => [],
],
],
];
}
/**
* Implements hook_css_alter().
*/
function fiu_ui_css_alter(&$css, AttachedAssetsInterface $assets) {
$status = \Drupal::config('fiu_ui.settings')
->get('status');
if (isset($css['modules/contrib/fiu/css/theme.css']) && $status) {
unset($css['modules/contrib/fiu/css/theme.css']);
}
}
/**
* Implements template_preprocess_fine_image_widget().
*/
function fiu_ui_preprocess_fine_image_widget(&$variables) {
$status = \Drupal::config('fiu_ui.settings')
->get('status');
if ($status) {
$variables['#attached']['library'][] = 'fiu_ui/settings';
}
}
Functions
Name![]() |
Description |
---|---|
fiu_ui_css_alter | Implements hook_css_alter(). |
fiu_ui_preprocess_fine_image_widget | Implements template_preprocess_fine_image_widget(). |
fiu_ui_theme | Implements hook_theme(). |