You are here

public static function WebformContentCreatorManageFieldsForm::create in Webform Content Creator 3.x

Same name and namespace in other branches
  1. 8 src/Form/WebformContentCreatorManageFieldsForm.php \Drupal\webform_content_creator\Form\WebformContentCreatorManageFieldsForm::create()
  2. 2.x src/Form/WebformContentCreatorManageFieldsForm.php \Drupal\webform_content_creator\Form\WebformContentCreatorManageFieldsForm::create()

Instantiates a new instance of this class.

This is a factory method that returns a new instance of this class. The factory should pass any needed dependencies into the constructor of this class, but not the container itself. Every call to this method must return a new instance of this class; that is, it may not implement a singleton.

Parameters

\Symfony\Component\DependencyInjection\ContainerInterface $container: The service container this instance should use.

Overrides FormBase::create

File

src/Form/WebformContentCreatorManageFieldsForm.php, line 54

Class

WebformContentCreatorManageFieldsForm
Form handler for the Webform content creator manage fields form.

Namespace

Drupal\webform_content_creator\Form

Code

public static function create(ContainerInterface $container) {
  $instance = new static();
  $instance->pluginFieldType = $container
    ->get('plugin.manager.field.field_type');
  $instance->entityTypeManager = $container
    ->get('entity_type.manager');
  $instance->fieldMappingManager = $container
    ->get('plugin.manager.webform_content_creator.field_mapping');
  return $instance;
}