protected function EntityRow::buildViewModeOptions

Return the main options, which are shown in the summary title.

2 calls to EntityRow::buildViewModeOptions()
EntityRow::buildOptionsForm in drupal/core/modules/views/lib/Drupal/views/Plugin/views/row/EntityRow.php
Overrides Drupal\views\Plugin\views\row\RowPluginBase::buildOptionsForm().
EntityRow::summaryTitle in drupal/core/modules/views/lib/Drupal/views/Plugin/views/row/EntityRow.php
Overrides Drupal\views\Plugin\views\PluginBase::summaryTitle().

File

drupal/core/modules/views/lib/Drupal/views/Plugin/views/row/EntityRow.php, line 121
Contains \Drupal\views\Plugin\views\row\EntityRow.

Class

EntityRow
Generic entity row plugin to provide a common base for all entity types.

Namespace

Drupal\views\Plugin\views\row

Code

protected function buildViewModeOptions() {
  $options = array();
  $view_modes = entity_get_view_modes($this->entityType);
  foreach ($view_modes as $mode => $settings) {
    $options[$mode] = $settings['label'];
  }
  return $options;
}