function EntityFormDisplayResourceTestBase::getExpectedNormalizedEntity

Same name in other branches
  1. 8.9.x core/tests/Drupal/FunctionalTests/Rest/EntityFormDisplayResourceTestBase.php \Drupal\FunctionalTests\Rest\EntityFormDisplayResourceTestBase::getExpectedNormalizedEntity()
  2. 10 core/tests/Drupal/FunctionalTests/Rest/EntityFormDisplayResourceTestBase.php \Drupal\FunctionalTests\Rest\EntityFormDisplayResourceTestBase::getExpectedNormalizedEntity()
  3. 11.x core/tests/Drupal/FunctionalTests/Rest/EntityFormDisplayResourceTestBase.php \Drupal\FunctionalTests\Rest\EntityFormDisplayResourceTestBase::getExpectedNormalizedEntity()

Overrides EntityResourceTestBase::getExpectedNormalizedEntity

File

core/tests/Drupal/FunctionalTests/Rest/EntityFormDisplayResourceTestBase.php, line 59

Class

EntityFormDisplayResourceTestBase

Namespace

Drupal\FunctionalTests\Rest

Code

protected function getExpectedNormalizedEntity() {
    return [
        'bundle' => 'camelids',
        'content' => [
            'created' => [
                'type' => 'datetime_timestamp',
                'weight' => 10,
                'region' => 'content',
                'settings' => [],
                'third_party_settings' => [],
            ],
            'promote' => [
                'type' => 'boolean_checkbox',
                'settings' => [
                    'display_label' => TRUE,
                ],
                'weight' => 15,
                'region' => 'content',
                'third_party_settings' => [],
            ],
            'status' => [
                'type' => 'boolean_checkbox',
                'weight' => 120,
                'region' => 'content',
                'settings' => [
                    'display_label' => TRUE,
                ],
                'third_party_settings' => [],
            ],
            'sticky' => [
                'type' => 'boolean_checkbox',
                'settings' => [
                    'display_label' => TRUE,
                ],
                'weight' => 16,
                'region' => 'content',
                'third_party_settings' => [],
            ],
            'title' => [
                'type' => 'string_textfield',
                'weight' => -5,
                'region' => 'content',
                'settings' => [
                    'size' => 60,
                    'placeholder' => '',
                ],
                'third_party_settings' => [],
            ],
            'uid' => [
                'type' => 'entity_reference_autocomplete',
                'weight' => 5,
                'settings' => [
                    'match_operator' => 'CONTAINS',
                    'match_limit' => 10,
                    'size' => 60,
                    'placeholder' => '',
                ],
                'region' => 'content',
                'third_party_settings' => [],
            ],
        ],
        'dependencies' => [
            'config' => [
                'node.type.camelids',
            ],
        ],
        'hidden' => [],
        'id' => 'node.camelids.default',
        'langcode' => 'en',
        'mode' => 'default',
        'status' => NULL,
        'targetEntityType' => 'node',
        'uuid' => $this->entity
            ->uuid(),
    ];
}

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