protected function ViewsReferenceItem::getAllViewDisplayIds in Views Reference Field 8.2
Get all views display IDs.
Return value
array An array of view display IDs keyed bu plugin name.
1 call to ViewsReferenceItem::getAllViewDisplayIds()
- ViewsReferenceItem::fieldSettingsForm in src/
Plugin/ Field/ FieldType/ ViewsReferenceItem.php - Returns a form for the field-level settings.
File
- src/
Plugin/ Field/ FieldType/ ViewsReferenceItem.php, line 156
Class
- ViewsReferenceItem
- Defines the 'viewsreference' entity field type.
Namespace
Drupal\viewsreference\Plugin\Field\FieldTypeCode
protected function getAllViewDisplayIds() {
$types = Views::pluginList();
$options = [];
foreach ($types as $key => $type) {
if ($type['type'] === 'display') {
$options[str_replace('display:', '', $key)] = $type['title']
->render();
}
}
return $options;
}