function EntityDisplayFormBase::getRegions

Same name and namespace in other branches
  1. 8.9.x core/modules/field_ui/src/Form/EntityDisplayFormBase.php \Drupal\field_ui\Form\EntityDisplayFormBase::getRegions()
  2. 10 core/modules/field_ui/src/Form/EntityDisplayFormBase.php \Drupal\field_ui\Form\EntityDisplayFormBase::getRegions()
  3. 11.x core/modules/field_ui/src/Form/EntityDisplayFormBase.php \Drupal\field_ui\Form\EntityDisplayFormBase::getRegions()

Get the regions needed to create the overview form.

Return value

array Example usage:

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.'),
    ),
);
5 calls to EntityDisplayFormBase::getRegions()
EntityDisplayFormBase::buildExtraFieldRow in core/modules/field_ui/src/Form/EntityDisplayFormBase.php
Builds the table row structure for a single extra field.
EntityDisplayFormBase::buildFieldRow in core/modules/field_ui/src/Form/EntityDisplayFormBase.php
Builds the table row structure for a single field.
EntityDisplayFormBase::form in core/modules/field_ui/src/Form/EntityDisplayFormBase.php
Gets the actual form array to be built.
EntityDisplayFormBase::getRegionOptions in core/modules/field_ui/src/Form/EntityDisplayFormBase.php
Returns an associative array of all regions.
EntityDisplayFormBase::getRowRegion in core/modules/field_ui/src/Form/EntityDisplayFormBase.php
Returns the region to which a row in the display overview belongs.

File

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

Class

EntityDisplayFormBase
Base class for EntityDisplay edit forms.

Namespace

Drupal\field_ui\Form

Code

public function getRegions() {
    return [
        'content' => [
            'title' => $this->t('Content'),
            'invisible' => TRUE,
            'message' => $this->t('No field is displayed.'),
        ],
        'hidden' => [
            'title' => $this->t('Disabled', [], [
                'context' => 'Plural',
            ]),
            'message' => $this->t('No field is hidden.'),
        ],
    ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.