interface RenderCallbackInterface

Same name in other branches
  1. 9 core/lib/Drupal/Core/Render/Element/RenderCallbackInterface.php \Drupal\Core\Render\Element\RenderCallbackInterface
  2. 10 core/lib/Drupal/Core/Render/Element/RenderCallbackInterface.php \Drupal\Core\Render\Element\RenderCallbackInterface
  3. 11.x core/lib/Drupal/Core/Render/Element/RenderCallbackInterface.php \Drupal\Core\Render\Element\RenderCallbackInterface

Indicates all public methods are safe to use in render callbacks.

This should only be used when all public methods on the class are supposed to used as render callbacks or the class implements ElementInterface. If this is not the case then use TrustedCallbackInterface instead.

Hierarchy

Expanded class hierarchy of RenderCallbackInterface

All classes that implement RenderCallbackInterface

See also

\Drupal\Core\Render\Element\ElementInterface

\Drupal\Core\Security\TrustedCallbackInterface

\Drupal\Core\Render\Renderer::doCallback()

4 files declare their use of RenderCallbackInterface
BlockRenderAlterContent.php in core/modules/block/tests/modules/block_test/src/BlockRenderAlterContent.php
ColorSystemBrandingBlockAlter.php in core/modules/color/src/ColorSystemBrandingBlockAlter.php
HistoryRenderCallback.php in core/modules/history/src/HistoryRenderCallback.php
Renderer.php in core/lib/Drupal/Core/Render/Renderer.php

File

core/lib/Drupal/Core/Render/Element/RenderCallbackInterface.php, line 16

Namespace

Drupal\Core\Render\Element
View source
interface RenderCallbackInterface {

}

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