SlickViews.php in Slick Views 8.2
File
src/Plugin/views/style/SlickViews.php
View source
<?php
namespace Drupal\slick_views\Plugin\views\style;
use Drupal\Core\Form\FormStateInterface;
class SlickViews extends SlickViewsBase {
public function buildOptionsForm(&$form, FormStateInterface $form_state) {
$definition = $this
->getDefinedFormScopes();
$this
->buildSettingsForm($form, $definition);
}
public function render() {
$settings = $this
->buildSettings();
$elements = [];
foreach ($this
->renderGrouping($this->view->result, $settings['grouping']) as $rows) {
$build = $this
->buildElements($settings, $rows);
if (empty($settings['vanilla']) && isset($build['items'][0])) {
$this
->blazyManager()
->isBlazy($settings, $build['items'][0]);
}
$settings['first_image'] = isset($rows[0]) ? $this
->getFirstImage($rows[0]) : [];
$build['settings'] = $settings;
$elements = $this->manager
->build($build);
unset($build);
}
return $elements;
}
}