Mapping.php in Zircon Profile 8
Same filename in this branch
Same filename and directory in other branches
Contains \Drupal\Core\Config\Schema\Mapping.
Namespace
Drupal\Core\Config\SchemaFile
core/lib/Drupal/Core/Config/Schema/Mapping.phpView source
<?php
/**
* @file
* Contains \Drupal\Core\Config\Schema\Mapping.
*/
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 = isset($this->value[$key]) ? $this->value[$key] : NULL;
$definition = isset($this->definition['mapping'][$key]) ? $this->definition['mapping'][$key] : array();
return $this
->buildDataDefinition($definition, $value, $key);
}
}