public TypedDataManagerInterface::getInstance(array $options)
Parameters
array $options: An array of options with the following keys:
- object: The parent typed data object, implementing the TypedDataInterface and either the ListInterface or the ComplexDataInterface.
- property: The name of the property to instantiate, or the delta of the the list item to instantiate.
- value: The value to set. If set, it has to match one of the supported data type formats as documented by the data type classes.
Return value
\Drupal\Core\TypedData\TypedDataInterface The new property instance.
Throws
\InvalidArgumentException If the given property is not known, or the passed object does not implement the ListInterface or the ComplexDataInterface.
Overrides MapperInterface::getInstance
See also
\Drupal\Core\TypedData\TypedDataManager::getPropertyInstance()
File
- core/lib/Drupal/Core/TypedData/TypedDataManagerInterface.php, line 131
Class
- TypedDataManagerInterface
- Defines an interface for typed data manager.
Namespace
Drupal\Core\TypedData
Code
public function getInstance(array $options);
Please login to continue.