protected function EntityReferenceTableFormatter::getConfigurableViewModes in Reference Table Formatter 2.0.x
Get the view modes which can be selected for this field formatter.
Return value
string[] Array of view mode options; translated labels keyed by ID.
2 calls to EntityReferenceTableFormatter::getConfigurableViewModes()
- EntityReferenceTableFormatter::settingsForm in src/
Plugin/ Field/ FieldFormatter/ EntityReferenceTableFormatter.php - Returns a form to configure settings for the formatter.
- EntityReferenceTableFormatter::settingsSummary in src/
Plugin/ Field/ FieldFormatter/ EntityReferenceTableFormatter.php - Returns a short summary for the current formatter settings.
File
- src/
Plugin/ Field/ FieldFormatter/ EntityReferenceTableFormatter.php, line 197
Class
- EntityReferenceTableFormatter
- A field formatter to display a table.
Namespace
Drupal\reference_table_formatter\Plugin\Field\FieldFormatterCode
protected function getConfigurableViewModes() {
return $this->entityDisplayRepository
->getViewModeOptions($this
->getFieldSetting('target_type'));
}