EntityDisplayFormBase::getRegions

public EntityDisplayFormBase::getRegions()

Get the regions needed to create the overview form.

Return value

array Example usage:

1
2
3
4
5
6
7
8
9
10
11
return array(
  'content' => array(
    // label for the region.
    'title' => $this->t('Content'),
    // Indicates if the region is visible in the UI.
    'invisible' => TRUE,
    // A message to indicate that there is nothing to be displayed in
    // the region.
    'message' => $this->t('No field is displayed.'),
  ),
);

File

core/modules/field_ui/src/Form/EntityDisplayFormBase.php, line 92

Class

EntityDisplayFormBase
Base class for EntityDisplay edit forms.

Namespace

Drupal\field_ui\Form

Code

1
2
3
4
5
6
7
8
9
10
11
12
13
public function getRegions() {
  return array(
    'content' => array(
      'title' => $this->t('Content'),
      'invisible' => TRUE,
      'message' => $this->t('No field is displayed.')
    ),
    'hidden' => array(
      'title' => $this->t('Disabled', array(), array('context' => 'Plural')),
      'message' => $this->t('No field is hidden.')
    ),
  );
}
doc_Drupal
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.