Search for token

  1. Search 7.x for token
  2. Search 9.5.x for token
  3. Search 8.9.x for token
  4. Search 11.x for token
  5. Other projects

Exact matches

These are exact matches according to your search
Title Object type File name Summary
token service core/core.services.yml Drupal\Core\Utility\Token
Token class core/lib/Drupal/Core/Render/Element/Token.php Stores token data in a hidden form field.
Token class core/lib/Drupal/Core/Utility/Token.php Drupal placeholder/token replacement system.

All search results

Title Object type File name Summary
FormBuilder::renderFormTokenPlaceholder function core/lib/Drupal/Core/Form/FormBuilder.php Renders the form CSRF token. It's a #lazy_builder callback.
FormBuilder::setInvalidTokenError function core/lib/Drupal/Core/Form/FormBuilder.php
FormBuilderTest::providerTestFormTokenCacheability function core/tests/Drupal/Tests/Core/Form/FormBuilderTest.php Data provider for testFormTokenCacheability.
FormBuilderTest::providerTestInvalidToken function core/tests/Drupal/Tests/Core/Form/FormBuilderTest.php
FormBuilderTest::testFormTokenCacheability function core/tests/Drupal/Tests/Core/Form/FormBuilderTest.php @covers ::prepareForm
FormBuilderTest::testInvalidToken function core/tests/Drupal/Tests/Core/Form/FormBuilderTest.php @covers ::doBuildForm
FormCache::$csrfToken property core/lib/Drupal/Core/Form/FormCache.php The CSRF token generator to validate the form token.
FormCacheTest::$csrfToken property core/tests/Drupal/Tests/Core/Form/FormCacheTest.php The CSRF token generator.
FormCacheTest::testCacheToken function core/tests/Drupal/KernelTests/Core/Form/FormCacheTest.php Tests the form cache with a logged-in user.
FormCacheTest::testGetCacheInvalidToken function core/tests/Drupal/Tests/Core/Form/FormCacheTest.php @covers ::getCache
FormCacheTest::testGetCacheValidToken function core/tests/Drupal/Tests/Core/Form/FormCacheTest.php @covers ::getCache
FormCacheTest::testNoCacheToken function core/tests/Drupal/KernelTests/Core/Form/FormCacheTest.php Tests the form cache without a logged-in user.
FormState::$invalidToken property core/lib/Drupal/Core/Form/FormState.php Determines if only safe element value callbacks are called.
FormState::hasInvalidToken function core/lib/Drupal/Core/Form/FormState.php Determines if the form has an invalid token.
FormState::setInvalidToken function core/lib/Drupal/Core/Form/FormState.php Flags the form state as having or not an invalid token.
FormStateDecoratorBase::hasInvalidToken function core/lib/Drupal/Core/Form/FormStateDecoratorBase.php Determines if the form has an invalid token.
FormStateDecoratorBase::setInvalidToken function core/lib/Drupal/Core/Form/FormStateDecoratorBase.php Flags the form state as having or not an invalid token.
FormStateDecoratorBaseTest::testHasInvalidToken function core/tests/Drupal/Tests/Core/Form/FormStateDecoratorBaseTest.php @covers ::hasInvalidToken
FormStateDecoratorBaseTest::testSetInvalidToken function core/tests/Drupal/Tests/Core/Form/FormStateDecoratorBaseTest.php @covers ::setInvalidToken
FormStateInterface::hasInvalidToken function core/lib/Drupal/Core/Form/FormStateInterface.php Determines if the form has an invalid token.
FormStateInterface::setInvalidToken function core/lib/Drupal/Core/Form/FormStateInterface.php Flags the form state as having or not an invalid token.
FormTest::testGetFormsCsrfToken function core/modules/system/tests/src/Functional/Form/FormTest.php CSRF tokens for GET forms should not be added by default.
FormTest::testInputWithInvalidToken function core/modules/system/tests/src/Functional/Form/FormTest.php Tests that input is retained for safe elements even with an invalid token.
FormTestBase::$csrfToken property core/tests/Drupal/Tests/Core/Form/FormTestBase.php The CSRF token generator.
FormTestValidateNoToken class core/modules/system/tests/modules/form_test/src/Form/FormTestValidateNoToken.php Form to test the validation of forms with a disabled CSRF token.
FormTestValidateNoToken.php file core/modules/system/tests/modules/form_test/src/Form/FormTestValidateNoToken.php
FormTestValidateNoToken::buildForm function core/modules/system/tests/modules/form_test/src/Form/FormTestValidateNoToken.php Form constructor.
FormTestValidateNoToken::getFormId function core/modules/system/tests/modules/form_test/src/Form/FormTestValidateNoToken.php Returns a unique string identifying the form.
FormTestValidateNoToken::submitForm function core/modules/system/tests/modules/form_test/src/Form/FormTestValidateNoToken.php Form submission handler.
FormValidator::$csrfToken property core/lib/Drupal/Core/Form/FormValidator.php The CSRF token generator to validate the form token.
FormValidator::setInvalidTokenError function core/lib/Drupal/Core/Form/FormValidator.php
FormValidatorInterface::setInvalidTokenError function core/lib/Drupal/Core/Form/FormValidatorInterface.php Sets a form_token error on the given form state.
FormValidatorTest::$csrfToken property core/tests/Drupal/Tests/Core/Form/FormValidatorTest.php The CSRF token generator to validate the form token.
FormValidatorTest::testValidateInvalidFormToken function core/tests/Drupal/Tests/Core/Form/FormValidatorTest.php @covers ::validateForm
FormValidatorTest::testValidateValidFormToken function core/tests/Drupal/Tests/Core/Form/FormValidatorTest.php @covers ::validateForm
hook_tokens function core/lib/Drupal/Core/Utility/token.api.php Provide replacement values for placeholder tokens.
hook_tokens_alter function core/lib/Drupal/Core/Utility/token.api.php Alter replacement values for placeholder tokens.
hook_token_info function core/lib/Drupal/Core/Utility/token.api.php Provide information about available placeholder tokens and token types.
hook_token_info_alter function core/lib/Drupal/Core/Utility/token.api.php Alter the metadata about available placeholder tokens and token types.
ImageStyle::getPathToken function core/modules/image/src/Entity/ImageStyle.php Generates a token to protect an image style derivative.
ImageStyleInterface::getPathToken function core/modules/image/src/ImageStyleInterface.php Generates a token to protect an image style derivative.
ImageStyleTest::testGetPathToken function core/modules/image/tests/src/Unit/ImageStyleTest.php @covers ::getPathToken
IMAGE_DERIVATIVE_TOKEN constant core/modules/image/image.module The name of the query parameter for image derivative tokens.
Interpolator::$endToken property composer/Plugin/Scaffold/Interpolator.php The character sequence that identifies the end of a token.
Interpolator::$startToken property composer/Plugin/Scaffold/Interpolator.php The character sequence that identifies the start of a token.
Interpolator::findTokens function composer/Plugin/Scaffold/Interpolator.php Finds all of the tokens in the provided message.
LinkViewsTokensTest class core/modules/link/tests/src/Functional/Views/LinkViewsTokensTest.php Tests the views integration for link tokens.
LinkViewsTokensTest.php file core/modules/link/tests/src/Functional/Views/LinkViewsTokensTest.php
LinkViewsTokensTest::$defaultTheme property core/modules/link/tests/src/Functional/Views/LinkViewsTokensTest.php The theme to install as the default for testing.
LinkViewsTokensTest::$fieldName property core/modules/link/tests/src/Functional/Views/LinkViewsTokensTest.php The field name used for the link field.

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