public function ViewfieldItem::getDisplayTypeOptions in Viewfield 8.3
Get an options array of all Views display types.
Return value
array The array of options.
1 call to ViewfieldItem::getDisplayTypeOptions()
- ViewfieldItem::fieldSettingsForm in src/
Plugin/ Field/ FieldType/ ViewfieldItem.php - Returns a form for the field-level settings.
File
- src/
Plugin/ Field/ FieldType/ ViewfieldItem.php, line 228
Class
- ViewfieldItem
- Plugin implementation of the 'viewfield' field type.
Namespace
Drupal\viewfield\Plugin\Field\FieldTypeCode
public function getDisplayTypeOptions() {
$display_type_options = [];
foreach (Views::pluginList() as $key => $type) {
if ($type['type'] == 'display') {
$display_type_options[str_replace('display:', '', $key)] = FieldFilteredMarkup::create($type['title']);
}
}
natcasesort($display_type_options);
return $display_type_options;
}