You are here

public function BlazyViewsFieldPluginBase::mergedViewsSettings in Blazy 7

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

Merges the settings.

1 call to BlazyViewsFieldPluginBase::mergedViewsSettings()
BlazyViewsFieldFile::render in src/Plugin/views/field/BlazyViewsFieldFile.php
Render the field.

File

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

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->name;
  return array_merge(BlazyDefault::entitySettings(), $settings);
}