function DisplayPluginBase::buildRenderingLanguageOptions

Same name in other branches
  1. 8.9.x core/modules/views/src/Plugin/views/display/DisplayPluginBase.php \Drupal\views\Plugin\views\display\DisplayPluginBase::buildRenderingLanguageOptions()
  2. 10 core/modules/views/src/Plugin/views/display/DisplayPluginBase.php \Drupal\views\Plugin\views\display\DisplayPluginBase::buildRenderingLanguageOptions()
  3. 11.x core/modules/views/src/Plugin/views/display/DisplayPluginBase.php \Drupal\views\Plugin\views\display\DisplayPluginBase::buildRenderingLanguageOptions()

Returns the available rendering strategies for language-aware entities.

Return value

array An array of available entity row renderers keyed by renderer identifiers.

2 calls to DisplayPluginBase::buildRenderingLanguageOptions()
DisplayPluginBase::buildOptionsForm in core/modules/views/src/Plugin/views/display/DisplayPluginBase.php
Provide a form to edit options for this plugin.
DisplayPluginBase::optionsSummary in core/modules/views/src/Plugin/views/display/DisplayPluginBase.php
Provides the default summary for options in the views UI.

File

core/modules/views/src/Plugin/views/display/DisplayPluginBase.php, line 2742

Class

DisplayPluginBase
Base class for views display plugins.

Namespace

Drupal\views\Plugin\views\display

Code

protected function buildRenderingLanguageOptions() {
    // @todo Consider making these plugins. See
    //   https://www.drupal.org/node/2173811.
    // Pass the current rendering language (in this case a one element array) so
    // is not lost when there are language configuration changes.
    return $this->listLanguages(LanguageInterface::STATE_CONFIGURABLE | LanguageInterface::STATE_SITE_DEFAULT | PluginBase::INCLUDE_NEGOTIATED | PluginBase::INCLUDE_ENTITY, [
        $this->getOption('rendering_language'),
    ]);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.