Drupal 8  8.0.2
ContainerFactory Class Reference
Inheritance diagram for ContainerFactory:

Public Member Functions

 createInstance ($plugin_id, array $configuration=array())
- Public Member Functions inherited from DefaultFactory
 __construct (DiscoveryInterface $discovery, $plugin_interface=NULL)
 createInstance ($plugin_id, array $configuration=array())

Additional Inherited Members

- Static Public Member Functions inherited from DefaultFactory
static getPluginClass ($plugin_id, $plugin_definition=NULL, $required_interface=NULL)
- Protected Attributes inherited from DefaultFactory

Detailed Description

Plugin factory which passes a container to a create method.

Member Function Documentation

createInstance (   $plugin_id,
array  $configuration = array() 

{Creates a pre-configured instance of a plugin.

string$plugin_idThe ID of the plugin being instantiated.
array$configurationAn array of configuration relevant to the plugin instance.
object A fully configured plugin instance.
\Drupal\Component\Plugin\Exception\PluginExceptionIf the instance cannot be created, such as if the ID is invalid.

Implements FactoryInterface.

References Drupal\getContainer().

Here is the call graph for this function:

The documentation for this class was generated from the following file: