You are here

protected function LayoutBuilderEntityViewDisplayForm::buildFieldRow in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/layout_builder/src/Form/LayoutBuilderEntityViewDisplayForm.php \Drupal\layout_builder\Form\LayoutBuilderEntityViewDisplayForm::buildFieldRow()
  2. 10 core/modules/layout_builder/src/Form/LayoutBuilderEntityViewDisplayForm.php \Drupal\layout_builder\Form\LayoutBuilderEntityViewDisplayForm::buildFieldRow()

Builds the table row structure for a single field.

Parameters

\Drupal\Core\Field\FieldDefinitionInterface $field_definition: The field definition.

array $form: An associative array containing the structure of the form.

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

Return value

array A table row array.

Overrides EntityViewDisplayEditForm::buildFieldRow

File

core/modules/layout_builder/src/Form/LayoutBuilderEntityViewDisplayForm.php, line 220

Class

LayoutBuilderEntityViewDisplayForm
Edit form for the LayoutBuilderEntityViewDisplay entity type.

Namespace

Drupal\layout_builder\Form

Code

protected function buildFieldRow(FieldDefinitionInterface $field_definition, array $form, FormStateInterface $form_state) {
  if ($this->entity
    ->isLayoutBuilderEnabled()) {
    return [];
  }
  return parent::buildFieldRow($field_definition, $form, $form_state);
}