Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ArrayElement.php

function ArrayElement::createElement

Creates a contained typed configuration object.

Parameters

\Drupal\Core\TypedData\DataDefinitionInterface $definition: The data definition object.

mixed $value: (optional) The data value. If set, it has to match one of the supported data type format as documented for the data type classes.

string $key: The key of the contained element.

Return value

\Drupal\Core\TypedData\TypedDataInterface

1 call to ArrayElement::createElement()
ArrayElement::parse in core/lib/Drupal/Core/Config/Schema/ArrayElement.php
Builds an array of contained elements.

File

core/lib/Drupal/Core/Config/Schema/ArrayElement.php, line 153

Class

ArrayElement
Defines a generic configuration element that contains multiple properties.

Namespace

Drupal\Core\Config\Schema

Code

protected function createElement($definition, $value, $key) {
    return $this->getTypedDataManager()
        ->create($definition, $value, $key, $this);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal