You are here

public static function EntityViewBuilder::trustedCallbacks in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Entity/EntityViewBuilder.php \Drupal\Core\Entity\EntityViewBuilder::trustedCallbacks()
  2. 9 core/lib/Drupal/Core/Entity/EntityViewBuilder.php \Drupal\Core\Entity\EntityViewBuilder::trustedCallbacks()

Lists the trusted callbacks provided by the implementing class.

Trusted callbacks are public methods on the implementing class and can be invoked via \Drupal\Core\Security\DoTrustedCallbackTrait::doTrustedCallback().

Return value

string[] List of method names implemented by the class that can be used as trusted callbacks.

Overrides TrustedCallbackInterface::trustedCallbacks

See also

\Drupal\Core\Security\DoTrustedCallbackTrait::doTrustedCallback()

1 call to EntityViewBuilder::trustedCallbacks()
NodeViewBuilder::trustedCallbacks in core/modules/node/src/NodeViewBuilder.php
Lists the trusted callbacks provided by the implementing class.
2 methods override EntityViewBuilder::trustedCallbacks()
BlockViewBuilder::trustedCallbacks in core/modules/block/src/BlockViewBuilder.php
Lists the trusted callbacks provided by the implementing class.
NodeViewBuilder::trustedCallbacks in core/modules/node/src/NodeViewBuilder.php
Lists the trusted callbacks provided by the implementing class.

File

core/lib/Drupal/Core/Entity/EntityViewBuilder.php, line 138

Class

EntityViewBuilder
Base class for entity view builders.

Namespace

Drupal\Core\Entity

Code

public static function trustedCallbacks() {
  return [
    'build',
    'buildMultiple',
  ];
}