Files
2025-11-30 08:45:16 +08:00

40 lines
892 B
Plaintext

<?php
/**
* @file
* Functions to support theming in the THEMELABEL theme.
*/
use Drupal\Core\Form\FormStateInterface;
/**
* Implements hook_preprocess_HOOK() for page templates.
*/
function THEMENAME_preprocess_page(&$variables) {
// Add custom variables or modify existing ones.
}
/**
* Implements hook_preprocess_HOOK() for node templates.
*/
function THEMENAME_preprocess_node(&$variables) {
/** @var \Drupal\node\NodeInterface $node */
$node = $variables['node'];
// Add custom variables based on node.
}
/**
* Implements hook_theme_suggestions_HOOK_alter() for page templates.
*/
function THEMENAME_theme_suggestions_page_alter(array &$suggestions, array $variables) {
// Add custom template suggestions.
}
/**
* Implements hook_form_alter().
*/
function THEMENAME_form_alter(&$form, FormStateInterface $form_state, $form_id) {
// Modify forms as needed.
}