You are here

57 calls to Json::encode() in Drupal 8

ActiveLinkResponseFilter::setLinkActiveClass in core/lib/Drupal/Core/EventSubscriber/ActiveLinkResponseFilter.php
Sets the "is-active" class on relevant links.
ActiveLinkResponseFilterTest::providerTestSetLinkActiveClass in core/tests/Drupal/Tests/Core/EventSubscriber/ActiveLinkResponseFilterTest.php
Provides test data for testSetLinkActiveClass().
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.
CKEditorAdminTest::testExistingFormat in core/modules/ckeditor/tests/src/Functional/CKEditorAdminTest.php
Tests configuring a text editor for an existing text format.
CKEditorToolbarButtonTest::testImageButtonDisplay in core/modules/ckeditor/tests/src/Functional/CKEditorToolbarButtonTest.php
Method tests CKEditor image buttons.
CommentTest::testPostIndividualDxWithoutCriticalBaseFields in core/modules/jsonapi/tests/src/Functional/CommentTest.php
Tests POSTing a comment without critical base fields.
CommentTest::testPostIndividualSkipCommentApproval in core/modules/jsonapi/tests/src/Functional/CommentTest.php
Tests POSTing a comment with and without 'skip comment approval'.
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().
EntitySerializationTest::testSerialize in core/modules/serialization/tests/src/Kernel/EntitySerializationTest.php
Test registered Serializer's entity serialization for core's formats.
ExternalNormalizersTest::testFormatAgnosticNormalizers in core/modules/jsonapi/tests/src/Functional/ExternalNormalizersTest.php
Tests a format-agnostic normalizer.
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
Form submission handler.
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
Test 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
Test the reversibility of structured data
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
Test 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.
PlaceBlockPageVariant::build in core/modules/block_place/src/Plugin/DisplayVariant/PlaceBlockPageVariant.php
Builds and returns the renderable array for the display variant.
QuickEditIntegrationTest::testGetUntransformedTextCommand in core/modules/editor/tests/src/Kernel/QuickEditIntegrationTest.php
Tests GetUntransformedTextCommand AJAX command.
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.
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::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.
ResourceTestBase::testPatchIndividual in core/modules/jsonapi/tests/src/Functional/ResourceTestBase.php
Tests PATCHing an individual resource, plus edge cases to ensure good DX.
ResourceTestBase::testPostIndividual in core/modules/jsonapi/tests/src/Functional/ResourceTestBase.php
Tests POSTing an individual resource, plus edge cases to ensure good DX.
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/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.
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.
workspaces_toolbar in core/modules/workspaces/workspaces.module
Implements hook_toolbar().
_locale_rebuild_js in core/modules/locale/locale.module
(Re-)Creates the JavaScript translation file for a language.