You are here

public function DataFilterManagerInterface::createInstance in Typed Data API enhancements 8

Creates a pre-configured instance of a filter plugin.

Parameters

string $plugin_id: The ID of the plugin being instantiated; i.e., the filter machine name.

array $configuration: An array of configuration relevant to the plugin instance. As this plugin is not configurable, this is unused and should stay empty.

Return value

\Drupal\typed_data\DataFilterInterface A fully configured plugin instance.

Throws

\Drupal\Component\Plugin\Exception\PluginException If the instance cannot be created, such as if the ID is invalid.

Overrides FactoryInterface::createInstance

File

src/DataFilterManagerInterface.php, line 27

Class

DataFilterManagerInterface
Interface for the data filter manager.

Namespace

Drupal\typed_data

Code

public function createInstance($plugin_id, array $configuration = []);