You are here

public function ExtraFieldComponentType::getComponent in Flexiform 8

Get a component object.

Parameters

string $name: The name of the component.

array $options: The options for the component.

Return value

\Drupal\flexiform\FormComponent\FormComponentInterface The form component.

Overrides FormComponentTypeBase::getComponent

File

src/Plugin/FormComponentType/ExtraFieldComponentType.php, line 56

Class

ExtraFieldComponentType
Plugin for extra field components.

Namespace

Drupal\flexiform\Plugin\FormComponentType

Code

public function getComponent($name, array $options = []) {
  $component = parent::getComponent($name, $options);
  $component
    ->setExtraField($this
    ->getExtraField($name));
  return $component;
}