protected function Entity::buildViewModeOptions

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

Return value

array All view modes of the entity type.

1 call to Entity::buildViewModeOptions()
Entity::buildOptionsForm in drupal/core/modules/views/lib/Drupal/views/Plugin/views/area/Entity.php
Default options form that provides the label widget that all fields should have.

File

drupal/core/modules/views/lib/Drupal/views/Plugin/views/area/Entity.php, line 81
Contains \Drupal\views\Plugin\views\area\Entity.

Class

Entity
Provides an area handler which renders an entity in a certain view mode.

Namespace

Drupal\views\Plugin\views\area

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;
}