You are here

class TestCallables in Drupal 10

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Core/Render/RendererTest.php \Drupal\Tests\Core\Render\TestCallables
  2. 9 core/tests/Drupal/Tests/Core/Render/RendererTest.php \Drupal\Tests\Core\Render\TestCallables

Hierarchy

Expanded class hierarchy of TestCallables

File

core/tests/Drupal/Tests/Core/Render/RendererTest.php, line 1065
Contains \Drupal\Tests\Core\Render\RendererTest.

Namespace

Drupal\Tests\Core\Render
View source
class TestCallables implements TrustedCallbackInterface {
  public function preRenderPrinted($elements) {
    $elements['#printed'] = TRUE;
    return $elements;
  }

  /**
   * {@inheritdoc}
   */
  public static function trustedCallbacks() {
    return [
      'preRenderPrinted',
    ];
  }

}

Members

Namesort descending Modifiers Type Description Overrides
TestCallables::preRenderPrinted public function
TestCallables::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.
TrustedCallbackInterface::TRIGGER_WARNING constant Untrusted callbacks trigger E_USER_WARNING errors.