procedural_hook_theme.theme
Same filename and directory in other branches
File
-
core/
modules/ system/ tests/ themes/ HookCollector/ procedural_hook_theme/ procedural_hook_theme.theme
View source
<?php
/**
* @file
* Functions to support testing procedural theme hooks.
*/
declare (strict_types=1);
use Drupal\Core\Hook\Attribute\LegacyHook;
/**
* Implements hook_procedural_alter().
*/
function procedural_hook_theme_procedural_alter(array &$args) : void {
$args[] = 'Procedural theme hook executed.';
}
/**
* Implements hook_procedural_legacy_alter().
*/
function procedural_hook_theme_procedural_legacy_alter(array &$args) : void {
$args[] = 'Procedural theme hook did not execute.';
}
/**
* Implements hook_preprocess_HOOK().
*/
function procedural_hook_theme_preprocess_node(array &$variables) : void {
$variables['title'] = 'Procedural Node Preprocess';
}
/**
* Implements hook_preprocess_HOOK().
*/
function procedural_hook_theme_preprocess_node__article(array &$variables) : void {
$variables['title'] = 'Procedural Article Node Preprocess';
}
Functions
| Title | Deprecated | Summary |
|---|---|---|
| procedural_hook_theme_preprocess_node | Implements hook_preprocess_HOOK(). | |
| procedural_hook_theme_preprocess_node__article | Implements hook_preprocess_HOOK(). | |
| procedural_hook_theme_procedural_alter | Implements hook_procedural_alter(). | |
| procedural_hook_theme_procedural_legacy_alter | Implements hook_procedural_legacy_alter(). |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.