Preprocess.php

Namespace

Drupal\Core\Hook\Attribute

File

core/lib/Drupal/Core/Hook/Attribute/Preprocess.php

View source
<?php

declare (strict_types=1);
namespace Drupal\Core\Hook\Attribute;


/**
 * Attribute for defining a class method as a preprocess function.
 *
 * Pass no arguments for hook_preprocess `#[Preprocess]`.
 * For `hook_preprocess_HOOK` pass the `HOOK` without the `hook_preprocess`
 * portion `#[Preprocess('HOOK')]`.
 *
 * See \Drupal\Core\Hook\Attribute\Hook for additional information.
 */
class Preprocess extends Hook {
    
    /**
     * {@inheritdoc}
     */
    public const PREFIX = 'preprocess';

}

Classes

Title Deprecated Summary
Preprocess Attribute for defining a class method as a preprocess function.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.