class ElementInfoTestNumberBuilder

Same name in other branches
  1. 10 core/modules/system/tests/modules/element_info_test/src/ElementInfoTestNumberBuilder.php \Drupal\element_info_test\ElementInfoTestNumberBuilder

Provides a trusted callback to alter the element_info_test number element.

Hierarchy

Expanded class hierarchy of ElementInfoTestNumberBuilder

See also

element_info_test_element_info_alter()

3 files declare their use of ElementInfoTestNumberBuilder
ElementInfoTestHooks.php in core/modules/system/tests/modules/element_info_test/src/Hook/ElementInfoTestHooks.php
element_info_test.module in core/modules/system/tests/modules/element_info_test/element_info_test.module
WeightTest.php in core/tests/Drupal/KernelTests/Core/Render/Element/WeightTest.php

File

core/modules/system/tests/modules/element_info_test/src/ElementInfoTestNumberBuilder.php, line 14

Namespace

Drupal\element_info_test
View source
class ElementInfoTestNumberBuilder implements TrustedCallbackInterface {
    
    /**
     * {@inheritdoc}
     */
    public static function trustedCallbacks() {
        return [
            'preRender',
        ];
    }
    
    /**
     * Sets element_info_test - #pre_render callback.
     */
    public static function preRender(array $element) : array {
        return $element;
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title
ElementInfoTestNumberBuilder::preRender public static function Sets element_info_test - #pre_render callback.
ElementInfoTestNumberBuilder::trustedCallbacks public static function Lists the trusted callbacks provided by the implementing class. Overrides TrustedCallbackInterface::trustedCallbacks
TrustedCallbackInterface::THROW_EXCEPTION constant Untrusted callbacks throw exceptions.
TrustedCallbackInterface::TRIGGER_SILENCED_DEPRECATION constant Untrusted callbacks trigger silenced E_USER_DEPRECATION errors.

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