public static function WebformElementBase::create in Webform 6.x
Same name and namespace in other branches
- 8.5 src/Plugin/WebformElementBase.php \Drupal\webform\Plugin\WebformElementBase::create()
Creates an instance of the plugin.
Parameters
\Symfony\Component\DependencyInjection\ContainerInterface $container: The container to pull out services used in the plugin.
array $configuration: A configuration array containing information about the plugin instance.
string $plugin_id: The plugin ID for the plugin instance.
mixed $plugin_definition: The plugin implementation definition.
Return value
static Returns an instance of this plugin.
Overrides ContainerFactoryPluginInterface::create
16 calls to WebformElementBase::create()
- Captcha::create in src/
Plugin/ WebformElement/ Captcha.php - Creates an instance of the plugin.
- DateBase::create in src/
Plugin/ WebformElement/ DateBase.php - Creates an instance of the plugin.
- Email::create in src/
Plugin/ WebformElement/ Email.php - Creates an instance of the plugin.
- LanguageSelect::create in src/
Plugin/ WebformElement/ LanguageSelect.php - Creates an instance of the plugin.
- ProcessedText::create in src/
Plugin/ WebformElement/ ProcessedText.php - Creates an instance of the plugin.
16 methods override WebformElementBase::create()
- Captcha::create in src/
Plugin/ WebformElement/ Captcha.php - Creates an instance of the plugin.
- DateBase::create in src/
Plugin/ WebformElement/ DateBase.php - Creates an instance of the plugin.
- Email::create in src/
Plugin/ WebformElement/ Email.php - Creates an instance of the plugin.
- LanguageSelect::create in src/
Plugin/ WebformElement/ LanguageSelect.php - Creates an instance of the plugin.
- ProcessedText::create in src/
Plugin/ WebformElement/ ProcessedText.php - Creates an instance of the plugin.
File
- src/
Plugin/ WebformElementBase.php, line 139
Class
- WebformElementBase
- Provides a base class for a webform element.
Namespace
Drupal\webform\PluginCode
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
$instance = new static($configuration, $plugin_id, $plugin_definition);
$instance->logger = $container
->get('logger.factory')
->get('webform');
$instance->configFactory = $container
->get('config.factory');
$instance->moduleHandler = $container
->get('module_handler');
$instance->currentUser = $container
->get('current_user');
$instance->entityTypeManager = $container
->get('entity_type.manager');
$instance->elementInfo = $container
->get('plugin.manager.element_info');
$instance->elementManager = $container
->get('plugin.manager.webform.element');
$instance->tokenManager = $container
->get('webform.token_manager');
$instance->librariesManager = $container
->get('webform.libraries_manager');
return $instance;
}