function PluginBase::create

Instantiates a new instance of the implementing class using autowiring.

Return value

static

See also

\Drupal\Core\Plugin\ContainerFactoryPluginInterface

163 methods override PluginBase::create()
AjaxFormBlock::create in core/modules/system/tests/modules/ajax_forms_test/src/Plugin/Block/AjaxFormBlock.php
Instantiates a new instance of the implementing class using autowiring.
AnnounceBlock::create in core/modules/announcements_feed/src/Plugin/Block/AnnounceBlock.php
Instantiates a new instance of the implementing class using autowiring.
BlockedIp::create in core/modules/ban/src/Plugin/migrate/destination/BlockedIp.php
Instantiates a new instance of the implementing class using autowiring.
BlockPageVariant::create in core/modules/block/src/Plugin/DisplayVariant/BlockPageVariant.php
Instantiates a new instance of the implementing class using autowiring.
BlockPluginId::create in core/modules/block/src/Plugin/migrate/process/BlockPluginId.php
Instantiates a new instance of the implementing class using autowiring.

... See full list

File

core/lib/Drupal/Core/Plugin/PluginBase.php, line 31

Class

PluginBase
Base class for plugins supporting metadata inspection and translation.

Namespace

Drupal\Core\Plugin

Code

public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
  return static::createInstanceAutowired($container, $configuration, $plugin_id, $plugin_definition);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.