public function FlexiformEntityFormDisplay::getRegions in Flexiform 8
Get the regions needed to create the overview form.
I don't understand why in core these two methods are on the form_object rather than the EntityFormDisplay object itself. I have put them here so that it's easier to get access to the correct regions.
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.'),
),
);
Return value
array Example usage:
See also
\Drupal\field_ui\Form\EntityDisplayFormBase::getRegions()
1 call to FlexiformEntityFormDisplay::getRegions()
- FlexiformEntityFormDisplay::getRegionOptions in src/
FlexiformEntityFormDisplay.php - Returns an associative array of all regions.
File
- src/
FlexiformEntityFormDisplay.php, line 150
Class
- FlexiformEntityFormDisplay
- Defines a class to extend EntityFormDisplays.
Namespace
Drupal\flexiformCode
public function getRegions() {
return [
'content' => [
'title' => t('Content'),
'invisible' => TRUE,
'message' => t('No component is displayed.'),
],
'hidden' => [
'title' => t('Disabled', [], [
'context' => 'Plural',
]),
'message' => t('No component is hidden.'),
],
];
}