You are here

public function ViewsReferenceOffset::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/ViewsReferenceOffset.php, line 35

Class

ViewsReferenceOffset
The views reference setting offset results plugin.

Namespace

Drupal\viewsreference\Plugin\ViewsReferenceSetting

Code

public function alterView(ViewExecutable $view, $value) {
  if (!empty($value)) {
    $view
      ->setOffset($value);
  }
}