/**
  * Handle the event.
  *
  * @param TableIsQuerying $event
  */
 public function handle(TableIsQuerying $event)
 {
     $builder = $event->getBuilder();
     $views = $builder->getTableViews();
     if ($view = $views->active()) {
         $this->query->handle($event->getBuilder(), $event->getQuery(), $view);
     }
 }
 /**
  * Handle the event.
  *
  * @param TableIsQuerying $event
  * @throws \Exception
  */
 public function handle(TableIsQuerying $event)
 {
     $query = $event->getQuery();
     $builder = $event->getBuilder();
     $filters = $builder->getTableFilters();
     foreach ($filters->active() as $filter) {
         $this->query->filter($builder, $filter, $query);
     }
 }