Mapping.php 883 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. namespace Drupal\Core\Config\Schema;
  3. /**
  4. * Defines a mapping configuration element.
  5. *
  6. * This object may contain any number and type of nested properties and each
  7. * property key may have its own definition in the 'mapping' property of the
  8. * configuration schema.
  9. *
  10. * Properties in the configuration value that are not defined in the mapping
  11. * will get the 'undefined' data type.
  12. *
  13. * Read https://www.drupal.org/node/1905070 for more details about configuration
  14. * schema, types and type resolution.
  15. */
  16. class Mapping extends ArrayElement {
  17. /**
  18. * {@inheritdoc}
  19. */
  20. protected function getElementDefinition($key) {
  21. $value = isset($this->value[$key]) ? $this->value[$key] : NULL;
  22. $definition = isset($this->definition['mapping'][$key]) ? $this->definition['mapping'][$key] : [];
  23. return $this->buildDataDefinition($definition, $value, $key);
  24. }
  25. }