function ViewsBlock::defaultConfiguration

Same name in other branches
  1. 8.9.x core/modules/views/src/Plugin/Block/ViewsBlock.php \Drupal\views\Plugin\Block\ViewsBlock::defaultConfiguration()
  2. 10 core/modules/views/src/Plugin/Block/ViewsBlock.php \Drupal\views\Plugin\Block\ViewsBlock::defaultConfiguration()
  3. 11.x core/modules/views/src/Plugin/Block/ViewsBlock.php \Drupal\views\Plugin\Block\ViewsBlock::defaultConfiguration()

Overrides ViewsBlockBase::defaultConfiguration

File

core/modules/views/src/Plugin/Block/ViewsBlock.php, line 97

Class

ViewsBlock
Provides a generic Views block.

Namespace

Drupal\views\Plugin\Block

Code

public function defaultConfiguration() {
    $settings = parent::defaultConfiguration();
    if ($this->displaySet) {
        $settings += $this->view->display_handler
            ->blockSettings($settings);
    }
    // Set custom cache settings.
    if (isset($this->pluginDefinition['cache'])) {
        $settings['cache'] = $this->pluginDefinition['cache'];
    }
    return $settings;
}

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