public function OverviewBase::buildForm

Form constructor.

Parameters

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

array $form_state: An associative array containing the current state of the form.

Return value

array The form structure.

Overrides FormInterface::buildForm

2 calls to OverviewBase::buildForm()
DisplayOverview::buildForm in drupal/core/modules/field_ui/lib/Drupal/field_ui/DisplayOverview.php
Implements \Drupal\Core\Form\FormInterface::buildForm().
FieldOverview::buildForm in drupal/core/modules/field_ui/lib/Drupal/field_ui/FieldOverview.php
Implements \Drupal\Core\Form\FormInterface::buildForm().
2 methods override OverviewBase::buildForm()
DisplayOverview::buildForm in drupal/core/modules/field_ui/lib/Drupal/field_ui/DisplayOverview.php
Implements \Drupal\Core\Form\FormInterface::buildForm().
FieldOverview::buildForm in drupal/core/modules/field_ui/lib/Drupal/field_ui/FieldOverview.php
Implements \Drupal\Core\Form\FormInterface::buildForm().

File

drupal/core/modules/field_ui/lib/Drupal/field_ui/OverviewBase.php, line 77
Contains \Drupal\field_ui\OverviewBase.

Class

OverviewBase
Abstract base class for Field UI overview forms.

Namespace

Drupal\field_ui

Code

public function buildForm(array $form, array &$form_state, $entity_type = NULL, $bundle = NULL) {
  $entity_info = $this->entityManager
    ->getDefinition($entity_type);
  if (!empty($entity_info['bundle_prefix'])) {
    $bundle = $entity_info['bundle_prefix'] . $bundle;
  }
  $this->entity_type = $entity_type;
  $this->bundle = $bundle;
  $this->adminPath = $this->entityManager
    ->getAdminPath($this->entity_type, $this->bundle);
}