public function ViewsReferenceLimit::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/ ViewsReferenceLimit.php, line 35
Class
- ViewsReferenceLimit
- The views reference setting limit results plugin.
Namespace
Drupal\viewsreference\Plugin\ViewsReferenceSettingCode
public function alterView(ViewExecutable $view, $value) {
if ($value !== "") {
$view
->setItemsPerPage($value);
}
}