You are here

public function ViewsDataEvent::addData in Hook Event Dispatcher 8.2

Same name and namespace in other branches
  1. 3.x modules/views_event_dispatcher/src/Event/Views/ViewsDataEvent.php \Drupal\views_event_dispatcher\Event\Views\ViewsDataEvent::addData()

Add data to the views data.

Parameters

array $data: Data to add to the views data.

See also

\hook_views_data()

File

modules/views_event_dispatcher/src/Event/Views/ViewsDataEvent.php, line 30

Class

ViewsDataEvent
Class ViewsDataEvent.

Namespace

Drupal\views_event_dispatcher\Event\Views

Code

public function addData(array $data) {
  $this->data = array_merge_recursive($this->data, $data);
}