Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. StylePluginBase.php

function StylePluginBase::init

Overrides \Drupal\views\Plugin\views\PluginBase::init().

The style options might come externally as the style can be sourced from at least two locations. If it's not included, look on the display.

Overrides PluginBase::init

File

core/modules/views/src/Plugin/views/style/StylePluginBase.php, line 129

Class

StylePluginBase
Base class for views style plugins.

Namespace

Drupal\views\Plugin\views\style

Code

public function init(ViewExecutable $view, DisplayPluginBase $display, ?array &$options = NULL) {
    parent::init($view, $display, $options);
    if ($this->usesRowPlugin() && $display->getOption('row')) {
        $this->view->rowPlugin = $display->getPlugin('row');
    }
    $this->options += [
        'grouping' => [],
    ];
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal