public function WorkbenchSettingsForm::getOptions in Workbench 8
Gets a formatted list of all Views.
1 call to WorkbenchSettingsForm::getOptions()
- WorkbenchSettingsForm::buildForm in src/
Form/ WorkbenchSettingsForm.php - Form constructor.
File
- src/
Form/ WorkbenchSettingsForm.php, line 81 - Settings form for Workbench module.
Class
- WorkbenchSettingsForm
- Generates the Workbench configuration form.
Namespace
Drupal\workbench\FormCode
public function getOptions() {
$views = \Drupal::entityTypeManager()
->getStorage('view')
->loadMultiple();
foreach ($views as $view => $data) {
$displays = $data
->get('display');
foreach ($displays as $display => $info) {
$options[$view . ':' . $display] = $data
->label() . ' : ' . $info['display_title'];
}
}
return $options;
}