You are here

public function FormElementComponentType::componentRows in Flexiform 8

Overrides FormComponentTypeBase::componentRows

File

src/Plugin/FormComponentType/FormElementComponentType.php, line 68

Class

FormElementComponentType
Plugin for field widget component types.

Namespace

Drupal\flexiform\Plugin\FormComponentType

Code

public function componentRows(EntityDisplayFormBase $form_object, array $form, FormStateInterface $form_state) {
  $rows = [];
  foreach ($this
    ->getFormDisplay()
    ->getComponents() as $component_name => $options) {
    if (isset($options['component_type']) && $options['component_type'] == $this
      ->getPluginId()) {
      $rows[$component_name] = $this
        ->buildComponentRow($form_object, $component_name, $form, $form_state);
    }
  }
  return $rows;
}