public function FieldOverview::getRowRegion

Returns the region to which a row in the display overview belongs.

Parameters

array $row: The row element.

Return value

string|null The region name this row belongs to.

File

drupal/core/modules/field_ui/lib/Drupal/field_ui/FieldOverview.php, line 719
Contains \Drupal\field_ui\FieldOverview.

Class

FieldOverview
Field UI field overview form.

Namespace

Drupal\field_ui

Code

public function getRowRegion($row) {
  switch ($row['#row_type']) {
    case 'field':
    case 'extra_field':
      return 'content';
    case 'add_new_field':

      // If no input in 'label', assume the row has not been dragged out of the
      // 'add new' section.
      return !empty($row['label']['#value']) ? 'content' : 'hidden';
  }
}