public function ViewsReferencePager::alterView in Views Reference Field 8.2
Alter the view object.
Parameters
\Drupal\views\ViewExecutable $view: The view object to alter.
mixed $value: The field value.
Overrides ViewsReferenceSettingInterface::alterView
File
- src/
Plugin/ ViewsReferenceSetting/ ViewsReferencePager.php, line 41
Class
- ViewsReferencePager
- The views reference setting pager plugin.
Namespace
Drupal\viewsreference\Plugin\ViewsReferenceSettingCode
public function alterView(ViewExecutable $view, $value) {
if (!empty($value)) {
$pager = $view->display_handler
->getOption('pager');
$pager['type'] = $value;
$view->display_handler
->setOption('pager', $pager);
}
}