altcolor-1.0.0-beta1/altcolor.module
altcolor.module
<?php
/**
* @file
* Contains procedural hooks for the Alternative color module. Remove @ D10 EOL.
*/
use Drupal\altcolor\Hook\AltColorFormHooks;
use Drupal\altcolor\Hook\AltColorHooks;
use Drupal\altcolor\Hook\AltColorPreprocessHooks;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Routing\RouteMatchInterface;
/**
* Implements hook_help().
*/
#[LegacyHook]
function altcolor_help($route_name, RouteMatchInterface $route_match) {
return \Drupal::service(AltColorHooks::class)->help($route_name, $route_match);
}
/**
* Implements hook_theme_registry_alter().
*/
#[LegacyHook]
function altcolor_theme_registry_alter(&$theme_registry) {
\Drupal::service(AltColorHooks::class)->themeRegistryAlter($theme_registry);
}
/**
* Implements hook_preprocess().
*/
#[LegacyHook]
function altcolor_preprocess(&$variables, $hook) {
if ($hook == 'html') {
\Drupal::service(AltColorPreprocessHooks::class)->preprocessHtml($variables);
}
}
/**
* Implements hook_form_FORM_ID_alter().
*/
#[LegacyHook]
function altcolor_form_system_theme_settings_alter(&$form, FormStateInterface $form_state, $form_id) {
\Drupal::service(AltColorFormHooks::class)->formSystemThemeSettingsAlter($form, $form_state, $form_id);
}
/**
* Implements hook_themes_installed().
*/
#[LegacyHook]
function altcolor_themes_installed() {
\Drupal::service(AltColorHooks::class)->themesInstalled();
}
/**
* Implements hook_themes_uninstalled().
*/
#[LegacyHook]
function altcolor_themes_uninstalled() {
\Drupal::service(AltColorHooks::class)->themesUninstalled();
}
