You are here

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

Class

ViewsReferenceTitle
The views reference setting title plugin.

Namespace

Drupal\viewsreference\Plugin\ViewsReferenceSetting

Code

public function alterView(ViewExecutable $view, $value) {
  if (empty($value)) {
    $view->display_handler
      ->setOption('title', '');
  }
}