protected function TaxonomyViewsIntegratorSettingsForm::getViewDisplayOptions in Taxonomy Views Integrator 8
Return an array of displays for a given view id.
Parameters
string $view_id: View id to populate options from.
Return value
array Drupal render array options values.
1 call to TaxonomyViewsIntegratorSettingsForm::getViewDisplayOptions()
- TaxonomyViewsIntegratorSettingsForm::buildForm in src/
Form/ TaxonomyViewsIntegratorSettingsForm.php - Form constructor.
File
- src/
Form/ TaxonomyViewsIntegratorSettingsForm.php, line 210
Class
- TaxonomyViewsIntegratorSettingsForm
- TVI global settings form.
Namespace
Drupal\tvi\FormCode
protected function getViewDisplayOptions(string $view_id) {
$display_options = [];
$view = $this->entityTypeManager
->getStorage('view')
->load($view_id);
if ($view) {
foreach ($view
->get('display') as $display) {
$display_options[$display['id']] = $display['display_title'] . ' (' . $display['display_plugin'] . ')';
}
}
return $display_options;
}