public static function PluginType::createFromDefinition in Plugin 8.2
Creates a plugin type based on a definition.
Parameters
\Symfony\Component\DependencyInjection\ContainerInterface $container:
mixed[] $definition:
Return value
static
Overrides PluginTypeInterface::createFromDefinition
4 calls to PluginType::createFromDefinition()
- PluginTypeTest::setUp in tests/
src/ Unit/ PluginType/ PluginTypeTest.php - PluginTypeTest::testCreateFromDefinition in tests/
src/ Unit/ PluginType/ PluginTypeTest.php - @covers ::createFromDefinition @covers ::__construct
- PluginTypeTest::testEnsureTypedPluginDefinition in tests/
src/ Unit/ PluginType/ PluginTypeTest.php - @covers ::ensureTypedPluginDefinition @covers ::createFromDefinition @covers ::__construct
- PluginTypeTest::testGetPluginConfigurationSchemaIdWithDefinedId in tests/
src/ Unit/ PluginType/ PluginTypeTest.php - @covers ::getPluginConfigurationSchemaId
File
- src/
PluginType/ PluginType.php, line 163
Class
- PluginType
- Provides a plugin type.
Namespace
Drupal\plugin\PluginTypeCode
public static function createFromDefinition(ContainerInterface $container, array $definition) {
return new static($definition, $container, $container
->get('string_translation'), $container
->get('class_resolver'), $container
->get('config.typed'));
}