Mapping.php

Same filename in this branch
  1. 9 core/modules/views/src/Plugin/views/style/Mapping.php
Same filename in other branches
  1. 8.9.x core/modules/views/src/Plugin/views/style/Mapping.php
  2. 8.9.x core/lib/Drupal/Core/Config/Schema/Mapping.php
  3. 10 core/modules/views/src/Plugin/views/style/Mapping.php
  4. 10 core/lib/Drupal/Core/Config/Schema/Mapping.php
  5. 11.x core/modules/views/src/Plugin/views/style/Mapping.php
  6. 11.x core/lib/Drupal/Core/Config/Schema/Mapping.php

Namespace

Drupal\Core\Config\Schema

File

core/lib/Drupal/Core/Config/Schema/Mapping.php

View source
<?php

namespace Drupal\Core\Config\Schema;


/**
 * Defines a mapping configuration element.
 *
 * This object may contain any number and type of nested properties and each
 * property key may have its own definition in the 'mapping' property of the
 * configuration schema.
 *
 * Properties in the configuration value that are not defined in the mapping
 * will get the 'undefined' data type.
 *
 * Read https://www.drupal.org/node/1905070 for more details about configuration
 * schema, types and type resolution.
 */
class Mapping extends ArrayElement {
    
    /**
     * {@inheritdoc}
     */
    protected function getElementDefinition($key) {
        $value = $this->value[$key] ?? NULL;
        $definition = $this->definition['mapping'][$key] ?? [];
        return $this->buildDataDefinition($definition, $value, $key);
    }

}

Classes

Title Deprecated Summary
Mapping Defines a mapping configuration element.

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