public function TypedDataManager::createInstance

Implements \Drupal\Component\Plugin\PluginManagerInterface::createInstance().

Parameters

string $plugin_id: The id of a plugin, i.e. the data type.

array $configuration: The plugin configuration, i.e. the data definition.

string $name: (optional) If a property or list item is to be created, the name of the property or the delta of the list item.

mixed $parent: (optional) If a property or list item is to be created, the parent typed data object implementing either the ListInterface or the ComplexDataInterface.

Return value

\Drupal\Core\TypedData\TypedDataInterface The instantiated typed data object.

Overrides PluginManagerBase::createInstance

File

drupal/core/lib/Drupal/Core/TypedData/TypedDataManager.php, line 84
Contains \Drupal\Core\TypedData\TypedDataManager.

Class

TypedDataManager
Manages data type plugins.

Namespace

Drupal\Core\TypedData

Code

public function createInstance($plugin_id, array $configuration, $name = NULL, $parent = NULL) {
  return $this->factory
    ->createInstance($plugin_id, $configuration, $name, $parent);
}