You are here

public static function FormElementComponent::create in Flexiform 8

Creates an instance of the form componenent.

Parameters

\Symfony\Component\DependencyInjection\ContainerInterface $container: The container to pull out services used in the componenet.

string $name: The component name.

array $options: The component options.

\Drupal\flexiform\FlexiformEntityFormDisplay $form_display: The flexiform entity form display.

Overrides ContainerFactoryFormComponentInterface::create

File

src/Plugin/FormComponentType/FormElementComponent.php, line 50

Class

FormElementComponent
Component class for field widgets.

Namespace

Drupal\flexiform\Plugin\FormComponentType

Code

public static function create(ContainerInterface $container, $name, array $options, FlexiformEntityFormDisplay $form_display) {
  return new static($name, $options, $form_display, $container
    ->get('plugin.manager.flexiform.form_element'), $container
    ->get('context.handler'));
}