class Feed

The plugin that handles a feed, such as RSS or atom.

Attributes

#[ViewsDisplay(id: "feed", title: new TranslatableMarkup("Feed"), admin: new TranslatableMarkup("Feed"), help: new TranslatableMarkup("Display the view as a feed, such as an RSS feed."), uses_route: TRUE, returns_response: TRUE)]

Hierarchy

  • class \Drupal\views\Plugin\views\display\Feed implements \Drupal\views\Plugin\views\display\ResponseDisplayPluginInterface extends \Drupal\views\Plugin\views\display\PathPluginBase

Expanded class hierarchy of Feed

Related topics

42 string references to 'Feed'
BigPipeResponseAttachmentsProcessorTest::attachmentsProvider in core/modules/big_pipe/tests/src/Unit/Render/BigPipeResponseAttachmentsProcessorTest.php
Provides data to testHtmlResponse().
Block::prepareRow in core/modules/block/src/Plugin/migrate/source/Block.php
Adds additional data to the row.
BlockPluginId::transform in core/modules/block/src/Plugin/migrate/process/BlockPluginId.php
Set the block plugin id.
Feed::getType in core/modules/views/src/Plugin/views/display/Feed.php
HtmlResponseAttachmentsProcessor::processAttachments in core/lib/Drupal/Core/Render/HtmlResponseAttachmentsProcessor.php
Processes the attachments of a response that has attachments.

... See full list

File

core/modules/views/src/Plugin/views/display/Feed.php, line 22

Namespace

Drupal\views\Plugin\views\display
View source
class Feed extends PathPluginBase implements ResponseDisplayPluginInterface {
  
  /**
   * Whether the display allows the use of AJAX or not.
   *
   * @var bool
   */
  protected $ajaxEnabled = FALSE;
  
  /**
   * Whether the display allows the use of a pager or not.
   *
   * @var bool
   */
  protected $usesPager = FALSE;
  
  /**
   * The renderer.
   *
   * @var \Drupal\Core\Render\RendererInterface
   */
  protected $renderer;
  
  /**
   * Constructs a PathPluginBase object.
   *
   * @param array $configuration
   *   A configuration array containing information about the plugin instance.
   * @param string $plugin_id
   *   The plugin ID for the plugin instance.
   * @param mixed $plugin_definition
   *   The plugin implementation definition.
   * @param \Drupal\Core\Routing\RouteProviderInterface $route_provider
   *   The route provider.
   * @param \Drupal\Core\State\StateInterface $state
   *   The state key value store.
   * @param \Drupal\Core\Render\RendererInterface $renderer
   *   The renderer.
   */
  public function __construct(array $configuration, $plugin_id, $plugin_definition, RouteProviderInterface $route_provider, StateInterface $state, RendererInterface $renderer) {
    parent::__construct($configuration, $plugin_id, $plugin_definition, $route_provider, $state);
    $this->renderer = $renderer;
  }
  
  /**
   * {@inheritdoc}
   */
  public function getType() {
    return 'feed';
  }
  
  /**
   * {@inheritdoc}
   */
  public static function buildResponse($view_id, $display_id, array $args = []) {
    $build = static::buildBasicRenderable($view_id, $display_id, $args);
    // Set up an empty response, so for example RSS can set the proper
    // Content-Type header.
    $response = new CacheableResponse('', 200);
    $build['#response'] = $response;
    /** @var \Drupal\Core\Render\RendererInterface $renderer */
    $renderer = \Drupal::service('renderer');
    $output = (string) $renderer->renderRoot($build);
    if (empty($output)) {
      throw new NotFoundHttpException();
    }
    $response->setContent($output);
    $cache_metadata = CacheableMetadata::createFromRenderArray($build);
    $response->addCacheableDependency($cache_metadata);
    // Set the HTTP headers and status code on the response if any bubbled.
    if (!empty($build['#attached']['http_header'])) {
      static::setHeaders($response, $build['#attached']['http_header']);
    }
    return $response;
  }
  
  /**
   * Sets headers on a response object.
   *
   * @param \Drupal\Core\Cache\CacheableResponse $response
   *   The HTML response to update.
   * @param array $headers
   *   The headers to set, as an array. The items in this array should be as
   *   follows:
   *   - The header name.
   *   - The header value.
   *   - (optional) Whether to replace a current value with the new one, or add
   *     it to the others. If the value is not replaced, it will be appended,
   *     resulting in a header like this: 'Header: value1,value2'.
   *
   * @see \Drupal\Core\Render\HtmlResponseAttachmentsProcessor::setHeaders()
   */
  protected static function setHeaders(CacheableResponse $response, array $headers) : void {
    foreach ($headers as $values) {
      $name = $values[0];
      $value = $values[1];
      $replace = !empty($values[2]);
      // Drupal treats the HTTP response status code like a header, even though
      // it really is not.
      if (strtolower($name) === 'status') {
        $response->setStatusCode($value);
      }
      else {
        $response->headers
          ->set($name, $value, $replace);
      }
    }
  }
  
  /**
   * {@inheritdoc}
   */
  public function execute() {
    parent::execute();
    return $this->view
      ->render();
  }
  
  /**
   * {@inheritdoc}
   */
  public function preview() {
    $output = $this->view
      ->render();
    if (!empty($this->view->live_preview)) {
      $output = [
        '#prefix' => '<pre>',
        '#plain_text' => $this->renderer
          ->renderRoot($output),
        '#suffix' => '</pre>',
      ];
    }
    return $output;
  }
  
  /**
   * {@inheritdoc}
   */
  public function render() {
    $build = $this->view->style_plugin
      ->render($this->view->result);
    $this->applyDisplayCacheabilityMetadata($build);
    return $build;
  }
  
  /**
   * {@inheritdoc}
   */
  public function defaultableSections($section = NULL) {
    $sections = parent::defaultableSections($section);
    if (in_array($section, [
      'style',
      'row',
    ])) {
      return FALSE;
    }
    // Tell views our sitename_title option belongs in the title section.
    if ($section == 'title') {
      $sections[] = 'sitename_title';
    }
    elseif (!$section) {
      $sections['title'][] = 'sitename_title';
    }
    return $sections;
  }
  
  /**
   * {@inheritdoc}
   */
  protected function defineOptions() {
    $options = parent::defineOptions();
    $options['displays'] = [
      'default' => [],
    ];
    // Overrides for standard stuff.
    $options['style']['contains']['type']['default'] = 'rss';
    $options['style']['contains']['options']['default'] = [
      'description' => '',
    ];
    $options['sitename_title']['default'] = FALSE;
    $options['row']['contains']['type']['default'] = 'rss_fields';
    $options['defaults']['default']['style'] = FALSE;
    $options['defaults']['default']['row'] = FALSE;
    return $options;
  }
  
  /**
   * {@inheritdoc}
   */
  public function newDisplay() {
    parent::newDisplay();
    // Set the default row style. Ideally this would be part of the option
    // definition, but in this case it's dependent on the view's base table,
    // which we don't know until init().
    if (empty($this->options['row']['type']) || $this->options['row']['type'] === 'rss_fields') {
      $row_plugins = Views::fetchPluginNames('row', $this->getType(), [
        $this->view->storage
          ->get('base_table'),
      ]);
      $default_row_plugin = key($row_plugins);
      $options = $this->getOption('row');
      $options['type'] = $default_row_plugin;
      $this->setOption('row', $options);
    }
  }
  
  /**
   * {@inheritdoc}
   */
  public function optionsSummary(&$categories, &$options) {
    parent::optionsSummary($categories, $options);
    // Since we're childing off the 'path' type, we'll still *call* our
    // category 'page' but let's override it so it says feed settings.
    $categories['page'] = [
      'title' => $this->t('Feed settings'),
      'column' => 'second',
      'build' => [
        '#weight' => -10,
      ],
    ];
    if ($this->getOption('sitename_title')) {
      $options['title']['value'] = $this->t('Using the site name');
    }
    $displays = array_filter($this->getOption('displays'));
    if (count($displays) > 1) {
      $attach_to = $this->t('Multiple displays');
    }
    elseif (count($displays) == 1) {
      $display = array_shift($displays);
      $displays = $this->view->storage
        ->get('display');
      if (!empty($displays[$display])) {
        $attach_to = $displays[$display]['display_title'];
      }
    }
    if (!isset($attach_to)) {
      $attach_to = $this->t('None');
    }
    $options['displays'] = [
      'category' => 'page',
      'title' => $this->t('Attach to'),
      'value' => $attach_to,
    ];
  }
  
  /**
   * {@inheritdoc}
   */
  public function buildOptionsForm(&$form, FormStateInterface $form_state) {
    // It is very important to call the parent function here.
    parent::buildOptionsForm($form, $form_state);
    switch ($form_state->get('section')) {
      case 'title':
        $title = $form['title'];
        // A little juggling to move the 'title' field beyond our checkbox.
        unset($form['title']);
        $form['sitename_title'] = [
          '#type' => 'checkbox',
          '#title' => $this->t('Use the site name for the title'),
          '#default_value' => $this->getOption('sitename_title'),
        ];
        $form['title'] = $title;
        $form['title']['#states'] = [
          'visible' => [
            ':input[name="sitename_title"]' => [
              'checked' => FALSE,
            ],
          ],
        ];
        break;

      case 'displays':
        $form['#title'] .= $this->t('Attach to');
        $displays = [];
        foreach ($this->view->storage
          ->get('display') as $display_id => $display) {
          // @todo The display plugin should have display_title and id as well.
          if ($this->view->displayHandlers
            ->has($display_id) && $this->view->displayHandlers
            ->get($display_id)
            ->acceptAttachments()) {
            $displays[$display_id] = $display['display_title'];
          }
        }
        $form['displays'] = [
          '#title' => $this->t('Displays'),
          '#type' => 'checkboxes',
          '#description' => $this->t('The feed icon will be available only to the selected displays.'),
          '#options' => array_map('\\Drupal\\Component\\Utility\\Html::escape', $displays),
          '#default_value' => $this->getOption('displays'),
        ];
        break;

      case 'path':
        $form['path']['#description'] = $this->t('This view will be displayed by visiting this path on your site. It is recommended that the path be something like "path/%/%/feed" or "path/%/%/rss.xml", putting one % in the path for each contextual filter you have defined in the view.');
    }
  }
  
  /**
   * {@inheritdoc}
   */
  public function submitOptionsForm(&$form, FormStateInterface $form_state) {
    parent::submitOptionsForm($form, $form_state);
    $section = $form_state->get('section');
    switch ($section) {
      case 'title':
        $this->setOption('sitename_title', $form_state->getValue('sitename_title'));
        break;

      case 'displays':
        $this->setOption($section, $form_state->getValue($section));
        break;

    }
  }
  
  /**
   * {@inheritdoc}
   */
  public function attachTo(ViewExecutable $view, $display_id, array &$build) {
    $displays = $this->getOption('displays');
    if (empty($displays[$display_id])) {
      return;
    }
    // Defer to the feed style; it may put in meta information, and/or
    // attach a feed icon.
    $view->setArguments($this->view->args);
    $view->setDisplay($this->display['id']);
    $view->buildTitle();
    if ($plugin = $view->display_handler
      ->getPlugin('style')) {
      $plugin->attachTo($build, $display_id, $view->getUrl(), $view->getTitle());
      foreach ($view->feedIcons as $feed_icon) {
        $this->view->feedIcons[] = $feed_icon;
      }
    }
  }
  
  /**
   * {@inheritdoc}
   */
  public function usesLinkDisplay() {
    return TRUE;
  }

}

Members

Title Sort descending Deprecated Modifiers Object type Summary Overriden Title Overrides
AutowiredInstanceTrait::createInstanceAutowired public static function Instantiates a new instance of the implementing class using autowiring.
DependencySerializationTrait::$_entityStorages protected property An array of entity type IDs keyed by the property name of their storages.
DependencySerializationTrait::$_serviceIds protected property An array of service IDs keyed by property name used for serialization.
DependencySerializationTrait::__sleep public function 2
DependencySerializationTrait::__wakeup public function 2
DependencyTrait::$dependencies protected property The object&#039;s dependencies.
DependencyTrait::addDependencies protected function Adds multiple dependencies.
DependencyTrait::addDependency protected function Adds a dependency.
DisplayPluginBase::$default_display public property The default display.
DisplayPluginBase::$display public property The display information coming directly from the view entity.
DisplayPluginBase::$extenders protected property Stores all available display extenders.
DisplayPluginBase::$handlers public property A multi-dimensional array of instantiated handlers used in this display.
DisplayPluginBase::$has_exposed public property Keeps track whether the display uses exposed filters.
DisplayPluginBase::$output public property Stores the rendered output of the display.
DisplayPluginBase::$plugins protected property An array of instantiated plugins used in this display.
DisplayPluginBase::$usesAJAX protected property Whether the display allows the use of AJAX or not. 2
DisplayPluginBase::$usesAreas protected property Whether the display allows area plugins. 2
DisplayPluginBase::$usesAttachments protected property Whether the display allows attachments. 6
DisplayPluginBase::$usesMore protected property Whether the display allows the use of a &#039;more&#039; link or not. 1
DisplayPluginBase::$usesOptions protected property Overrides PluginBase::$usesOptions 1
DisplayPluginBase::$view public property The top object of a view. Overrides PluginBase::$view
DisplayPluginBase::acceptAttachments public function Overrides DisplayPluginInterface::acceptAttachments
DisplayPluginBase::access public function Overrides DisplayPluginInterface::access
DisplayPluginBase::ajaxEnabled public function Overrides DisplayPluginInterface::ajaxEnabled
DisplayPluginBase::applyDisplayCacheabilityMetadata protected function Applies the cacheability of the current display to the given render array.
DisplayPluginBase::buildBasicRenderable public static function Overrides DisplayPluginInterface::buildBasicRenderable 1
DisplayPluginBase::buildRenderable public function Overrides DisplayPluginInterface::buildRenderable 1
DisplayPluginBase::buildRenderingLanguageOptions protected function Returns the available rendering strategies for language-aware entities.
DisplayPluginBase::calculateCacheMetadata public function Overrides DisplayPluginInterface::calculateCacheMetadata
DisplayPluginBase::calculateDependencies public function Overrides PluginBase::calculateDependencies 2
DisplayPluginBase::destroy public function Overrides PluginBase::destroy
DisplayPluginBase::displaysExposed public function Overrides DisplayPluginInterface::displaysExposed 2
DisplayPluginBase::elementPreRender public function Overrides DisplayPluginInterface::elementPreRender
DisplayPluginBase::getAllHandlers protected function Gets all the handlers used by the display.
DisplayPluginBase::getAllPlugins protected function Gets all the plugins used by the display.
DisplayPluginBase::getArgumentsTokens public function Overrides DisplayPluginInterface::getArgumentsTokens
DisplayPluginBase::getArgumentText public function Overrides DisplayPluginInterface::getArgumentText 1
DisplayPluginBase::getAttachedDisplays public function Overrides DisplayPluginInterface::getAttachedDisplays
DisplayPluginBase::getCacheMetadata public function Overrides DisplayPluginInterface::getCacheMetadata
DisplayPluginBase::getExtenders public function Overrides DisplayPluginInterface::getExtenders
DisplayPluginBase::getFieldLabels public function Overrides DisplayPluginInterface::getFieldLabels
DisplayPluginBase::getHandler public function Overrides DisplayPluginInterface::getHandler
DisplayPluginBase::getHandlers public function Overrides DisplayPluginInterface::getHandlers
DisplayPluginBase::getLinkDisplay public function Overrides DisplayPluginInterface::getLinkDisplay
DisplayPluginBase::getMoreUrl protected function Get the more URL for this view.
DisplayPluginBase::getOption public function Overrides DisplayPluginInterface::getOption
DisplayPluginBase::getPagerText public function Overrides DisplayPluginInterface::getPagerText 1
DisplayPluginBase::getPlugin public function Overrides DisplayPluginInterface::getPlugin
DisplayPluginBase::getRoutedDisplay public function Overrides DisplayPluginInterface::getRoutedDisplay
DisplayPluginBase::getSpecialBlocks public function Overrides DisplayPluginInterface::getSpecialBlocks
DisplayPluginBase::getUrl public function Overrides DisplayPluginInterface::getUrl
DisplayPluginBase::initDisplay public function Overrides DisplayPluginInterface::initDisplay 1
DisplayPluginBase::isBaseTableTranslatable protected function Returns whether the base table is of a translatable entity type.
DisplayPluginBase::isDefaultDisplay public function Overrides DisplayPluginInterface::isDefaultDisplay 1
DisplayPluginBase::isDefaulted public function Overrides DisplayPluginInterface::isDefaulted
DisplayPluginBase::isEnabled public function Overrides DisplayPluginInterface::isEnabled
DisplayPluginBase::isIdentifierUnique public function Overrides DisplayPluginInterface::isIdentifierUnique
DisplayPluginBase::isMoreEnabled public function Overrides DisplayPluginInterface::isMoreEnabled
DisplayPluginBase::isPagerEnabled public function Overrides DisplayPluginInterface::isPagerEnabled
DisplayPluginBase::mergeDefaults public function Overrides DisplayPluginInterface::mergeDefaults
DisplayPluginBase::mergeHandler protected function Merges handlers default values.
DisplayPluginBase::mergePlugin protected function Merges plugins default values.
DisplayPluginBase::optionLink public function Overrides DisplayPluginInterface::optionLink
DisplayPluginBase::optionsOverride public function Overrides DisplayPluginInterface::optionsOverride
DisplayPluginBase::outputIsEmpty public function Overrides DisplayPluginInterface::outputIsEmpty
DisplayPluginBase::overrideOption public function Overrides DisplayPluginInterface::overrideOption
DisplayPluginBase::preExecute public function Overrides DisplayPluginInterface::preExecute
DisplayPluginBase::query public function Overrides PluginBase::query 1
DisplayPluginBase::recursiveReplaceTokens protected function Replace the query parameters recursively, both key and value.
DisplayPluginBase::renderArea public function Overrides DisplayPluginInterface::renderArea
DisplayPluginBase::renderFilters public function Overrides DisplayPluginInterface::renderFilters
DisplayPluginBase::renderMoreLink public function Overrides DisplayPluginInterface::renderMoreLink
DisplayPluginBase::renderPager public function Overrides DisplayPluginInterface::renderPager 1
DisplayPluginBase::setOption public function Overrides DisplayPluginInterface::setOption
DisplayPluginBase::setOverride public function Overrides DisplayPluginInterface::setOverride
DisplayPluginBase::trustedCallbacks public static function Overrides PluginBase::trustedCallbacks
DisplayPluginBase::useGroupBy public function Overrides DisplayPluginInterface::useGroupBy
DisplayPluginBase::useMoreAlways public function Overrides DisplayPluginInterface::useMoreAlways
DisplayPluginBase::useMoreText public function Overrides DisplayPluginInterface::useMoreText
DisplayPluginBase::usesAJAX public function Overrides DisplayPluginInterface::usesAJAX 2
DisplayPluginBase::usesAreas public function Overrides DisplayPluginInterface::usesAreas 2
DisplayPluginBase::usesAttachments public function Overrides DisplayPluginInterface::usesAttachments 6
DisplayPluginBase::usesExposed public function Overrides DisplayPluginInterface::usesExposed 3
DisplayPluginBase::usesExposedFormInBlock public function Overrides DisplayPluginInterface::usesExposedFormInBlock 1
DisplayPluginBase::usesFields public function Overrides DisplayPluginInterface::usesFields
DisplayPluginBase::usesMore public function Overrides DisplayPluginInterface::usesMore 1
DisplayPluginBase::usesPager public function Overrides DisplayPluginInterface::usesPager 4
DisplayPluginBase::viewExposedFormBlocks public function Overrides DisplayPluginInterface::viewExposedFormBlocks
Feed::$ajaxEnabled protected property Whether the display allows the use of AJAX or not.
Feed::$renderer protected property The renderer. Overrides PluginBase::$renderer
Feed::$usesPager protected property Whether the display allows the use of a pager or not. Overrides DisplayPluginBase::$usesPager
Feed::attachTo public function Overrides DisplayPluginBase::attachTo
Feed::buildOptionsForm public function Overrides PathPluginBase::buildOptionsForm
Feed::buildResponse public static function Overrides ResponseDisplayPluginInterface::buildResponse
Feed::defaultableSections public function Overrides DisplayPluginBase::defaultableSections
Feed::defineOptions protected function Overrides PathPluginBase::defineOptions
Feed::execute public function Overrides PathPluginBase::execute
Feed::getType public function Overrides DisplayPluginBase::getType
Feed::newDisplay public function Overrides DisplayPluginBase::newDisplay
Feed::optionsSummary public function Overrides PathPluginBase::optionsSummary
Feed::preview public function Overrides DisplayPluginBase::preview
Feed::render public function Overrides DisplayPluginBase::render
Feed::setHeaders protected static function Sets headers on a response object.
Feed::submitOptionsForm public function Overrides PathPluginBase::submitOptionsForm
Feed::usesLinkDisplay public function Overrides DisplayPluginBase::usesLinkDisplay
Feed::__construct public function Constructs a PathPluginBase object. Overrides PathPluginBase::__construct
MessengerTrait::$messenger protected property The messenger. 25
MessengerTrait::messenger public function Gets the messenger. 25
MessengerTrait::setMessenger public function Sets the messenger.
PathPluginBase::$routeProvider protected property The route provider.
PathPluginBase::$state protected property The state key value store.
PathPluginBase::alterRoutes public function Overrides DisplayRouterInterface::alterRoutes
PathPluginBase::collectRoutes public function Overrides DisplayRouterInterface::collectRoutes 1
PathPluginBase::getAlteredRouteNames public function Overrides DisplayRouterInterface::getAlteredRouteNames
PathPluginBase::getMenuLinks public function Overrides DisplayMenuInterface::getMenuLinks
PathPluginBase::getPath public function Overrides DisplayPluginBase::getPath
PathPluginBase::getRoute protected function Generates a route entry for a given view and display. 1
PathPluginBase::getRouteName public function Overrides DisplayRouterInterface::getRouteName
PathPluginBase::getUrlInfo public function Overrides DisplayRouterInterface::getUrlInfo
PathPluginBase::hasPath public function Overrides DisplayPluginBase::hasPath
PathPluginBase::isDefaultTabPath protected function Determines if this display&#039;s path is a default tab.
PathPluginBase::overrideApplies protected function Determines whether the view overrides the given route. 1
PathPluginBase::overrideAppliesPathAndMethod protected function Determines whether an override for the path and method should happen.
PathPluginBase::remove public function Overrides DisplayPluginBase::remove
PathPluginBase::validate public function Overrides DisplayPluginBase::validate 1
PathPluginBase::validateOptionsForm public function Overrides DisplayPluginBase::validateOptionsForm 1
PathPluginBase::validatePath protected function Validates the path of the display.
PluginBase::$configuration protected property Configuration information passed into the plugin. 1
PluginBase::$definition public property Plugins&#039; definition.
PluginBase::$displayHandler public property The display object this plugin is for.
PluginBase::$options public property Options for this plugin will be held here.
PluginBase::$pluginDefinition protected property The plugin implementation definition. 1
PluginBase::$pluginId protected property The plugin ID.
PluginBase::$position public property The handler position.
PluginBase::create public static function Instantiates a new instance of the implementing class using autowiring. 165
PluginBase::DERIVATIVE_SEPARATOR constant A string which is used to separate base plugin IDs from the derivative ID.
PluginBase::doFilterByDefinedOptions protected function Do the work to filter out stored options depending on the defined options.
PluginBase::filterByDefinedOptions public function Overrides ViewsPluginInterface::filterByDefinedOptions
PluginBase::getAvailableGlobalTokens public function Overrides ViewsPluginInterface::getAvailableGlobalTokens
PluginBase::getBaseId public function Gets the base_plugin_id of the plugin instance. Overrides DerivativeInspectionInterface::getBaseId
PluginBase::getDerivativeId public function Gets the derivative_id of the plugin instance. Overrides DerivativeInspectionInterface::getDerivativeId
PluginBase::getPluginDefinition public function Gets the definition of the plugin implementation. Overrides PluginInspectionInterface::getPluginDefinition 2
PluginBase::getPluginId public function Gets the plugin ID of the plugin instance. Overrides PluginInspectionInterface::getPluginId
PluginBase::getProvider public function Overrides ViewsPluginInterface::getProvider
PluginBase::getRenderer protected function Returns the render API renderer. 1
PluginBase::globalTokenForm public function Overrides ViewsPluginInterface::globalTokenForm
PluginBase::globalTokenReplace public function Overrides ViewsPluginInterface::globalTokenReplace
PluginBase::INCLUDE_ENTITY constant Include entity row languages when listing languages.
PluginBase::INCLUDE_NEGOTIATED constant Include negotiated languages when listing languages.
PluginBase::init public function Overrides ViewsPluginInterface::init 6
PluginBase::isConfigurable Deprecated public function Determines if the plugin is configurable.
PluginBase::listLanguages protected function Makes an array of languages, optionally including special languages.
PluginBase::pluginTitle public function Overrides ViewsPluginInterface::pluginTitle
PluginBase::preRenderAddFieldsetMarkup public static function Overrides ViewsPluginInterface::preRenderAddFieldsetMarkup
PluginBase::preRenderFlattenData public static function Overrides ViewsPluginInterface::preRenderFlattenData
PluginBase::queryLanguageSubstitutions public static function Returns substitutions for Views queries for languages.
PluginBase::setOptionDefaults protected function Fills up the options of the plugin with defaults.
PluginBase::summaryTitle public function Overrides ViewsPluginInterface::summaryTitle 6
PluginBase::themeFunctions public function Overrides ViewsPluginInterface::themeFunctions 1
PluginBase::unpackOptions public function Overrides ViewsPluginInterface::unpackOptions
PluginBase::usesOptions public function Overrides ViewsPluginInterface::usesOptions 8
PluginBase::viewsTokenReplace protected function Replaces Views&#039; tokens in a given string. 1
PluginBase::VIEWS_QUERY_LANGUAGE_SITE_DEFAULT constant Query string to indicate the site default language.
PluginDependencyTrait::calculatePluginDependencies protected function Calculates and adds dependencies of a specific plugin instance. 1
PluginDependencyTrait::getPluginDependencies protected function Calculates and returns dependencies of a specific plugin instance.
PluginDependencyTrait::moduleHandler protected function Wraps the module handler. 1
PluginDependencyTrait::themeHandler protected function Wraps the theme handler. 1
StringTranslationTrait::$stringTranslation protected property The string translation service. 3
StringTranslationTrait::formatPlural protected function Formats a string containing a count of items.
StringTranslationTrait::getNumberOfPlurals protected function Returns the number of plurals supported by a given language.
StringTranslationTrait::getStringTranslation protected function Gets the string translation service.
StringTranslationTrait::setStringTranslation public function Sets the string translation service to use. 2
StringTranslationTrait::t protected function Translates a string to the current language or to a given language. 1
TrustedCallbackInterface::THROW_EXCEPTION constant Untrusted callbacks throw exceptions.
TrustedCallbackInterface::TRIGGER_SILENCED_DEPRECATION constant Untrusted callbacks trigger silenced E_USER_DEPRECATION errors.

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