You are here

public function DisplayPluginBase::setOption in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/views/src/Plugin/views/display/DisplayPluginBase.php \Drupal\views\Plugin\views\display\DisplayPluginBase::setOption()

Sets an option, on this display or the default display.

Overrides DisplayPluginInterface::setOption

12 calls to DisplayPluginBase::setOption()
Attachment::submitOptionsForm in core/modules/views/src/Plugin/views/display/Attachment.php
Perform any necessary changes to the form values prior to storage. There is no need for this function to actually store the data.
Block::submitOptionsForm in core/modules/views/src/Plugin/views/display/Block.php
Perform any necessary changes to the form values prior to storage. There is no need for this function to actually store the data.
DisplayPluginBase::mergeHandler in core/modules/views/src/Plugin/views/display/DisplayPluginBase.php
Merges handlers default values.
DisplayPluginBase::mergePlugin in core/modules/views/src/Plugin/views/display/DisplayPluginBase.php
Merges plugins default values.
DisplayPluginBase::overrideOption in core/modules/views/src/Plugin/views/display/DisplayPluginBase.php
Set an option and force it to be an override.

... See full list

File

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

Class

DisplayPluginBase
Base class for views display plugins.

Namespace

Drupal\views\Plugin\views\display

Code

public function setOption($option, $value) {
  if ($this
    ->isDefaulted($option)) {
    return $this->default_display
      ->setOption($option, $value);
  }

  // Set this in two places: On the handler where we'll notice it
  // but also on the display object so it gets saved. This should
  // only be a temporary fix.
  $this->display['display_options'][$option] = $value;
  return $this->options[$option] = $value;
}