interface TrustedCallbackInterface
Same name and namespace in other branches
- 9 core/lib/Drupal/Core/Security/TrustedCallbackInterface.php \Drupal\Core\Security\TrustedCallbackInterface
- 8.9.x core/lib/Drupal/Core/Security/TrustedCallbackInterface.php \Drupal\Core\Security\TrustedCallbackInterface
- 11.x core/lib/Drupal/Core/Security/TrustedCallbackInterface.php \Drupal\Core\Security\TrustedCallbackInterface
Interface to declare trusted callbacks.
Hierarchy
- interface \Drupal\Core\Security\TrustedCallbackInterface
Expanded class hierarchy of TrustedCallbackInterface
All classes that implement TrustedCallbackInterface
See also
\Drupal\Core\Security\DoTrustedCallbackTrait
21 files declare their use of TrustedCallbackInterface
- AutowireTest.php in core/
tests/ Drupal/ KernelTests/ Core/ DependencyInjection/ AutowireTest.php - DatelistElementFormTest.php in core/
tests/ Drupal/ KernelTests/ Core/ Datetime/ DatelistElementFormTest.php - DatetimeElementFormTest.php in core/
tests/ Drupal/ KernelTests/ Core/ Datetime/ DatetimeElementFormTest.php - DoTrustedCallbackTraitTest.php in core/
tests/ Drupal/ Tests/ Core/ Security/ DoTrustedCallbackTraitTest.php - ElementInfoTestNumberBuilder.php in core/
modules/ system/ tests/ modules/ element_info_test/ src/ ElementInfoTestNumberBuilder.php
File
-
core/
lib/ Drupal/ Core/ Security/ TrustedCallbackInterface.php, line 10
Namespace
Drupal\Core\SecurityView source
interface TrustedCallbackInterface {
/**
* Untrusted callbacks throw exceptions.
*/
const THROW_EXCEPTION = 'exception';
/**
* Untrusted callbacks trigger E_USER_WARNING errors.
*
* @deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. Use
* TrustedCallbackInterface::THROW_EXCEPTION or
* TrustedCallbackInterface::TRIGGER_SILENCED_DEPRECATION instead.
*
* @see https://www.drupal.org/node/3427367
*/
const TRIGGER_WARNING = 'warning';
/**
* Untrusted callbacks trigger silenced E_USER_DEPRECATION errors.
*/
const TRIGGER_SILENCED_DEPRECATION = 'silenced_deprecation';
/**
* 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 string[]
* List of method names implemented by the class that can be used as trusted
* callbacks.
*
* @see \Drupal\Core\Security\DoTrustedCallbackTrait::doTrustedCallback()
*/
public static function trustedCallbacks();
}
Members
Title Sort descending | Deprecated | Modifiers | Object type | Summary | Overrides |
---|---|---|---|---|---|
TrustedCallbackInterface::THROW_EXCEPTION | constant | Untrusted callbacks throw exceptions. | |||
TrustedCallbackInterface::TRIGGER_SILENCED_DEPRECATION | constant | Untrusted callbacks trigger silenced E_USER_DEPRECATION errors. | |||
TrustedCallbackInterface::TRIGGER_WARNING | Deprecated | constant | Untrusted callbacks trigger E_USER_WARNING errors. | ||
TrustedCallbackInterface::trustedCallbacks | public static | function | Lists the trusted callbacks provided by the implementing class. | 45 |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.