You are here

public function BlazyViewsFieldPluginBase::mergedViewsSettings in Blazy 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/views/field/BlazyViewsFieldPluginBase.php \Drupal\blazy\Plugin\views\field\BlazyViewsFieldPluginBase::mergedViewsSettings()
  2. 7 src/Plugin/views/field/BlazyViewsFieldPluginBase.php \Drupal\blazy\Plugin\views\field\BlazyViewsFieldPluginBase::mergedViewsSettings()

Merges the settings.

2 calls to BlazyViewsFieldPluginBase::mergedViewsSettings()
BlazyViewsFieldFile::render in src/Plugin/views/field/BlazyViewsFieldFile.php
Renders the field.
BlazyViewsFieldMedia::render in src/Plugin/views/field/BlazyViewsFieldMedia.php
Renders the field.

File

src/Plugin/views/field/BlazyViewsFieldPluginBase.php, line 126

Class

BlazyViewsFieldPluginBase
Defines a base views field plugin to render a preview of supported fields.

Namespace

Drupal\blazy\Plugin\views\field

Code

public function mergedViewsSettings() {
  $settings = [];

  // Only fetch what we already asked for.
  foreach ($this
    ->getDefaultValues() as $key => $default) {
    $settings[$key] = isset($this->options[$key]) ? $this->options[$key] : $default;
  }
  $settings['count'] = count($this->view->result);
  $settings['current_view_mode'] = $this->view->current_display;
  $settings['view_name'] = $this->view->storage
    ->id();
  return array_merge(BlazyDefault::entitySettings(), $settings);
}