You are here

public function TypedDataManager::getInstance in Drupal 9

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/TypedData/TypedDataManager.php \Drupal\Core\TypedData\TypedDataManager::getInstance()
  2. 10 core/lib/Drupal/Core/TypedData/TypedDataManager.php \Drupal\Core\TypedData\TypedDataManager::getInstance()

Gets a preconfigured instance of a plugin.

Parameters

array $options: An array of options that can be used to determine a suitable plugin to instantiate and how to configure it.

Return value

object|false A fully configured plugin instance. The interface of the plugin instance will depend on the plugin type. If no instance can be retrieved, FALSE will be returned.

Overrides PluginManagerBase::getInstance

File

core/lib/Drupal/Core/TypedData/TypedDataManager.php, line 144

Class

TypedDataManager
Manages data type plugins.

Namespace

Drupal\Core\TypedData

Code

public function getInstance(array $options) {
  return $this
    ->getPropertyInstance($options['object'], $options['property'], $options['value']);
}