78 calls to Json::encode()

ActiveLinkResponseFilter::setLinkActiveClass in core/lib/Drupal/Core/EventSubscriber/ActiveLinkResponseFilter.php
Sets the "is-active" class and aria-current attribute on relevant links.
ActiveLinkResponseFilterTest::providerTestSetLinkActiveClass in core/tests/Drupal/Tests/Core/EventSubscriber/ActiveLinkResponseFilterTest.php
Provides test data for testSetLinkActiveClass().
AjaxTestController::httpMethods in core/modules/system/tests/modules/ajax_test/src/Controller/AjaxTestController.php
Provides an Ajax link used with different HTTP methods.
BigPipeTest::testBigPipe in core/modules/big_pipe/tests/src/Functional/BigPipeTest.php
Tests BigPipe-delivered HTML responses when JavaScript is enabled.
BlockLibraryController::listBlocks in core/modules/block/src/Controller/BlockLibraryController.php
Shows a list of blocks that can be added to a theme's layout.
BlockListBuilder::buildBlocksForm in core/modules/block/src/BlockListBuilder.php
Builds the main "Blocks" portion of the form.
CKEditor5::buildConfigurationForm in core/modules/ckeditor5/src/Plugin/Editor/CKEditor5.php
Form constructor.
CKEditor5DialogTestController::testDialog in core/modules/ckeditor5/tests/modules/ckeditor5_test/src/Controller/CKEditor5DialogTestController.php
Returns a link that can open a node add form in an modal dialog.
CommentExtrasTest::testPostIndividualDxWithoutCriticalBaseFields in core/modules/jsonapi/tests/src/Functional/CommentExtrasTest.php
Tests POSTing a comment without critical base fields.
CommentExtrasTest::testPostIndividualSkipCommentApproval in core/modules/jsonapi/tests/src/Functional/CommentExtrasTest.php
Tests POSTing a comment with and without 'skip comment approval'.
ConfigEntityListTest::testList in core/modules/config/tests/src/Functional/ConfigEntityListTest.php
Tests entity list builder methods.
ConfigTranslationController::itemPage in core/modules/config_translation/src/Controller/ConfigTranslationController.php
Language translations overview page for a configuration name.
ContentModerationConfigureForm::buildConfigurationForm in core/modules/content_moderation/src/Form/ContentModerationConfigureForm.php
Form constructor.
ContextualLinks::render in core/modules/contextual/src/Plugin/views/field/ContextualLinks.php
Overrides \Drupal\views\Plugin\views\field\FieldPluginBase::render().
DisplayModeLocalAction::getOptions in core/modules/field_ui/src/DisplayModeLocalAction.php
EntityDisplayModeController::formModeTypeSelection in core/modules/field_ui/src/Controller/EntityDisplayModeController.php
Provides a list of eligible entity types for adding form modes.
EntityDisplayModeController::viewModeTypeSelection in core/modules/field_ui/src/Controller/EntityDisplayModeController.php
Provides a list of eligible entity types for adding view modes.
EntityDisplayModeListBuilder::getOperations in core/modules/field_ui/src/EntityDisplayModeListBuilder.php
EntityDisplayModeListBuilder::render in core/modules/field_ui/src/EntityDisplayModeListBuilder.php
EntityForm::actions in core/lib/Drupal/Core/Entity/EntityForm.php
Returns an array of supported actions for the current entity form.
EntityListBuilder::getDefaultOperations in core/lib/Drupal/Core/Entity/EntityListBuilder.php
Gets this list's default operations.
EntitySerializationTest::testSerialize in core/modules/serialization/tests/src/Kernel/EntitySerializationTest.php
Tests entity serialization for core's formats by a registered Serializer.
ExternalNormalizersTest::testFormatAgnosticNormalizers in core/modules/jsonapi/tests/src/Functional/ExternalNormalizersTest.php
Tests a format-agnostic normalizer.
FieldConfigListBuilder::getDefaultOperations in core/modules/field_ui/src/FieldConfigListBuilder.php
FieldUiLocalAction::getDerivativeDefinitions in core/modules/field_ui/src/Plugin/Derivative/FieldUiLocalAction.php
FileUploadTest::testPostFileUpload in core/modules/jsonapi/tests/src/Functional/FileUploadTest.php
Tests using the file upload POST route; needs second request to "use" file.
FormHelper::processStates in core/lib/Drupal/Core/Form/FormHelper.php
Adds JavaScript to change the state of an element based on another element.
FormHelperTest::testProcessStates in core/tests/Drupal/Tests/Core/Form/FormHelperTest.php
@covers ::processStates @dataProvider providerElements
FormTestFormStateValuesCleanForm::submitForm in core/modules/system/tests/modules/form_test/src/Form/FormTestFormStateValuesCleanForm.php
FormTestVerticalTabsForm::submitForm in core/modules/system/tests/modules/form_test/src/Form/FormTestVerticalTabsForm.php
FunctionsTest::testIndexedKeyedLinks in core/modules/system/tests/src/Kernel/Theme/FunctionsTest.php
Tests links.html.twig using links with indexed keys.
FunctionsTest::testLinks in core/modules/system/tests/src/Kernel/Theme/FunctionsTest.php
Tests links.html.twig.
JsCollectionRenderer::render in core/lib/Drupal/Core/Asset/JsCollectionRenderer.php
This class evaluates the aggregation enabled/disabled condition on a group by group basis by testing whether an aggregate file has been made for the group rather than by testing the site-wide aggregation setting. This allows this class to work…
JsonApiDocumentTopLevelNormalizerTest::testDenormalizeInvalidTypeAndNoType in core/modules/jsonapi/tests/src/Kernel/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php
Tests denormalization for related resources with missing or invalid types.
JsonApiDocumentTopLevelNormalizerTest::testDenormalizeUuid in core/modules/jsonapi/tests/src/Kernel/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php
Try to POST a node and check if it exists afterwards.
JsonApiFunctionalMultilingualTest::testPatchTranslation in core/modules/jsonapi/tests/src/Functional/JsonApiFunctionalMultilingualTest.php
Tests updating a translation.
JsonApiFunctionalMultilingualTest::testPatchTranslationFallback in core/modules/jsonapi/tests/src/Functional/JsonApiFunctionalMultilingualTest.php
Tests updating a translation fallback.
JsonApiFunctionalMultilingualTest::testPostTranslation in core/modules/jsonapi/tests/src/Functional/JsonApiFunctionalMultilingualTest.php
Tests creating a translation.
JsonApiFunctionalTest::testWrite in core/modules/jsonapi/tests/src/Functional/JsonApiFunctionalTest.php
Tests POST, PATCH and DELETE.
JsonApiRegressionTest::testDenormalizeAliasedRelationshipFromIssue2953207 in core/modules/jsonapi/tests/src/Functional/JsonApiRegressionTest.php
Ensures denormalizing relationships with aliased field names works.
JsonApiRegressionTest::testEmptyMapFieldTypeDenormalization in core/modules/jsonapi/tests/src/Functional/JsonApiRegressionTest.php
Ensure optional `@FieldType=map` fields are denormalized correctly.
JsonTest::testEncodingLength in core/tests/Drupal/Tests/Component/Serialization/JsonTest.php
Tests encoding length.
JsonTest::testEncodingStartEnd in core/tests/Drupal/Tests/Component/Serialization/JsonTest.php
Tests end and start of the encoded string.
JsonTest::testReversibility in core/tests/Drupal/Tests/Component/Serialization/JsonTest.php
Tests converting PHP variables to JSON strings and back.
JsonTest::testStructuredReversibility in core/tests/Drupal/Tests/Component/Serialization/JsonTest.php
Tests the reversibility of structured data.
LazyBuilders::renderAnnouncements in core/modules/announcements_feed/src/LazyBuilders.php
Render announcements.
LinkGenerator::generate in core/lib/Drupal/Core/Utility/LinkGenerator.php
For anonymous users, the "active" class will be calculated on the server, because most sites serve each anonymous user the same cached page anyway. For authenticated users, the "active" class will be calculated on the client…
MenuLinkContentTest::testLinkOptionsSerialization in core/modules/jsonapi/tests/src/Functional/MenuLinkContentTest.php
Tests requests using a serialized field item property.
NodeTest::testPatchPath in core/modules/jsonapi/tests/src/Functional/NodeTest.php
Tests PATCHing a node's path with and without 'create url aliases'.
NodeTest::testPostNonExistingAuthor in core/modules/jsonapi/tests/src/Functional/NodeTest.php
Creating relationships to missing resources should be 404 per JSON:API 1.1.
PermissionsPerBundleTest::testInvalidValue in core/tests/Drupal/KernelTests/Core/Recipe/PermissionsPerBundleTest.php
Tests that there is an exception if the permission templates are invalid.
RequestHandlerTest::testHandle in core/modules/rest/tests/src/Kernel/RequestHandlerTest.php
@covers ::handle
ResourceFetcher::parseResourceXml in core/modules/media/src/OEmbed/ResourceFetcher.php
Parses XML resource data.
ResourceFetcherTest::testFetchTimeout in core/modules/media/tests/src/Unit/ResourceFetcherTest.php
Tests that resources are fetched with a hard-coded timeout.
ResourceFetcherTest::testUnknownContentTypeHeader in core/modules/media/tests/src/Unit/ResourceFetcherTest.php
Tests how the resource fetcher handles unknown Content-Type headers.
ResourceResponseSubscriberTest::providerTestResponseFormat in core/modules/rest/tests/src/Unit/EventSubscriber/ResourceResponseSubscriberTest.php
ResourceResponseSubscriberTest::testSerialization in core/modules/rest/tests/src/Unit/EventSubscriber/ResourceResponseSubscriberTest.php
@covers ::onResponse @dataProvider providerTestSerialization
ResourceResponseValidator::validateSchema in core/modules/jsonapi/src/EventSubscriber/ResourceResponseValidator.php
Validates a string against a JSON Schema. It logs any possible errors.
ResourceTestBase::doTestPatchIndividual in core/modules/jsonapi/tests/src/Functional/ResourceTestBase.php
Tests PATCHing an individual resource, plus edge cases to ensure good DX.
ResourceTestBase::doTestPostIndividual in core/modules/jsonapi/tests/src/Functional/ResourceTestBase.php
Tests POSTing an individual resource, plus edge cases to ensure good DX.
ResourceTestBase::doTestRelationshipMutation in core/modules/jsonapi/tests/src/Functional/ResourceTestBase.php
Performs one round of relationship POST, PATCH and DELETE route testing.
ResourceTestBase::testGetIndividual in core/modules/jsonapi/tests/src/Functional/ResourceTestBase.php
Tests GETting an individual resource, plus edge cases to ensure good DX.
RowRenderCacheTest::doTestRenderedOutput in core/modules/views/tests/src/Kernel/Plugin/RowRenderCacheTest.php
Check whether the rendered output matches expectations.
SecurityAdvisoriesFetcher::getSecurityAdvisories in core/modules/system/src/SecurityAdvisories/SecurityAdvisoriesFetcher.php
Gets security advisories that are applicable for the current site.
SourcePluginBase::__construct in core/modules/migrate/src/Plugin/migrate/source/SourcePluginBase.php
template_preprocess_links in core/includes/theme.inc
Prepares variables for links templates.
TermTest::testPatchPath in core/modules/jsonapi/tests/src/Functional/TermTest.php
Tests PATCHing a term's path.
TestController::linksDisplay in core/modules/system/tests/modules/dialog_renderer_test/src/Controller/TestController.php
Displays test links that will open in the modal dialog.
TestController::linksDisplay in core/modules/system/tests/modules/off_canvas_test/src/Controller/TestController.php
Displays test links that will open in off-canvas dialog.
TestController::modal in core/modules/views/tests/modules/views_test_modal/src/Controller/TestController.php
Renders a link to open the /admin/content view in a modal dialog.
TimestampFormatter::viewElements in core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/TimestampFormatter.php
TwigExtensionTest::providerTestTwigSetAttribute in core/tests/Drupal/Tests/Core/Template/TwigExtensionTest.php
A data provider for ::testTwigSetAttribute().
UserTest::assertRpcLogin in core/modules/jsonapi/tests/src/Functional/UserTest.php
Verifies that logging in with the given username and password works.
UserTest::testPatchDxForSecuritySensitiveBaseFields in core/modules/jsonapi/tests/src/Functional/UserTest.php
Tests PATCHing security-sensitive base fields of the logged in account.
UserTest::testPatchSecurityOtherUser in core/modules/jsonapi/tests/src/Functional/UserTest.php
Tests PATCHing security-sensitive base fields to change other users.
WorkspaceListBuilder::offCanvasRender in core/modules/workspaces/src/WorkspaceListBuilder.php
Renders the off canvas elements.
WorkspacesLazyBuilders::renderToolbarTab in core/modules/workspaces/src/WorkspacesLazyBuilders.php
Lazy builder callback for rendering the workspace toolbar tab.
_locale_rebuild_js in core/modules/locale/locale.module
(Re-)Creates the JavaScript translation file for a language.

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