You are here

interface RenderCallbackInterface in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Render/Element/RenderCallbackInterface.php \Drupal\Core\Render\Element\RenderCallbackInterface
  2. 9 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()

3 files declare their use of RenderCallbackInterface
BlockRenderAlterContent.php in core/modules/block/tests/modules/block_test/src/BlockRenderAlterContent.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 {

}

Members