ElementInfoTestNumberBuilder.php

Same filename and directory in other branches
  1. 11.x core/modules/system/tests/modules/element_info_test/src/ElementInfoTestNumberBuilder.php
  2. 10 core/modules/system/tests/modules/element_info_test/src/ElementInfoTestNumberBuilder.php

Namespace

Drupal\element_info_test

File

core/modules/system/tests/modules/element_info_test/src/ElementInfoTestNumberBuilder.php

View source
<?php

declare (strict_types=1);
namespace Drupal\element_info_test;

use Drupal\Core\Security\TrustedCallbackInterface;

/**
 * Provides a trusted callback to alter the element_info_test number element.
 *
 * @see element_info_test_element_info_alter()
 */
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;
  }

}

Classes

Title Deprecated Summary
ElementInfoTestNumberBuilder Provides a trusted callback to alter the element_info_test number element.

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