/**
  * Handles datagrid event
  * 
  * @param QueryEvent $event
  */
 public function onQueryReady(QueryEvent $event)
 {
     $query = $event->getQuery();
     $query->setHint(Query::HINT_CUSTOM_OUTPUT_WALKER, 'Gedmo\\Translatable\\Query\\TreeWalker\\TranslationWalker');
     $query->setHint(TranslatableListener::HINT_TRANSLATABLE_LOCALE, $this->locale);
     $query->setHint(TranslatableListener::HINT_FALLBACK, $this->fallback);
 }
 public function testQueryEvent()
 {
     $event = new QueryEvent('test', new \stdClass());
     $this->assertSame('test', $event->getDataGridName());
     $this->assertInstanceOf('stdClass', $event->getQuery());
 }