protected function MaestroEngineTemplateFilter::generateTemplateOptions in Maestro 8.2
Same name and namespace in other branches
- 3.x src/Plugin/views/filter/MaestroEngineTemplateFilter.php \Drupal\maestro\Plugin\views\filter\MaestroEngineTemplateFilter::generateTemplateOptions()
Generate the options for this template.
File
- src/
Plugin/ views/ filter/ MaestroEngineTemplateFilter.php, line 51
Class
- MaestroEngineTemplateFilter
- Filter for Maestro Template names.
Namespace
Drupal\maestro\Plugin\views\filterCode
protected function generateTemplateOptions() {
$templates = MaestroEngine::getTemplates();
$options = [];
$options[0] = $this
->t(' - Any -');
foreach ($templates as $machine_name => $template) {
$options[$machine_name] = $template->label;
}
return $options;
}