ViewExecutable::initStyle

public ViewExecutable::initStyle()

Finds and initializes 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.

Return value

bool TRUE if the style plugin was or could be initialized, FALSE otherwise.

File

core/modules/views/src/ViewExecutable.php, line 867

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;
}
doc_Drupal
2016-10-29 09:54:24
Comments
Leave a Comment

Please login to continue.