A factory for typed config element objects.
This factory merges the type definition into the element definition prior to creating the instance.
Expanded class hierarchy of TypedConfigElementFactory
class TypedConfigElementFactory extends TypedDataFactory {
/**
* Overrides Drupal\Core\TypedData\TypedDataFactory::createInstance().
*/
public function createInstance($plugin_id, array $configuration, $name = NULL, $parent = NULL) {
$type_definition = $this->discovery
->getDefinition($plugin_id);
$configuration += $type_definition;
return parent::createInstance($plugin_id, $configuration, $name, $parent);
}
}
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DefaultFactory:: |
protected | property | The object that retrieves the definitions of the plugins that this factory instantiates. | |
DefaultFactory:: |
public static | function | Finds the class relevant for a given plugin. | |
DefaultFactory:: |
public | function | Constructs a Drupal\Component\Plugin\Factory\DefaultFactory object. | |
TypedConfigElementFactory:: |
public | function |
Overrides Drupal\Core\TypedData\TypedDataFactory::createInstance(). Overrides TypedDataFactory:: |