You are here

protected function Entity::buildViewModeOptions in Views (for Drupal 7) 8.3

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

2 calls to Entity::buildViewModeOptions()
Entity::buildOptionsForm in lib/Views/system/Plugin/views/row/Entity.php
Overrides Drupal\views\Plugin\views\row\RowPluginBase::buildOptionsForm().
Entity::summaryTitle in lib/Views/system/Plugin/views/row/Entity.php
Overrides Drupal\views\Plugin\views\PluginBase::summaryTitle().

File

lib/Views/system/Plugin/views/row/Entity.php, line 95
Definition of Views\system\Plugin\views\row\Entity.

Class

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

Namespace

Views\system\Plugin\views\row

Code

protected function buildViewModeOptions() {
  $options = array();
  if (!empty($this->entityInfo['view modes'])) {
    foreach ($this->entityInfo['view modes'] as $mode => $settings) {
      $options[$mode] = $settings['label'];
    }
  }
  return $options;
}