You are here

public function ViewExecutable::initStyle in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/modules/views/src/ViewExecutable.php \Drupal\views\ViewExecutable::initStyle()

Find and initialize the style plugin.

Note that arguments may have changed which style plugin we use, so check the view object first, then ask the display handler.

4 calls to ViewExecutable::initStyle()
ViewExecutable::build in core/modules/views/src/ViewExecutable.php
Build the query for the view.
ViewExecutable::getStyle in core/modules/views/src/ViewExecutable.php
Gets the current style plugin.
ViewExecutable::getTitle in core/modules/views/src/ViewExecutable.php
Get the view's current title. This can change depending upon how it was built.
ViewExecutable::render in core/modules/views/src/ViewExecutable.php
Render this view for a certain display.

File

core/modules/views/src/ViewExecutable.php, line 833
Contains \Drupal\views\ViewExecutable.

Class

ViewExecutable
Represents a view as a whole.

Namespace

Drupal\views

Code

public function initStyle() {
  if (isset($this->style_plugin)) {
    return TRUE;
  }
  $this->style_plugin = $this->display_handler
    ->getPlugin('style');
  if (empty($this->style_plugin)) {
    return FALSE;
  }
  return TRUE;
}