/** * Query the database to get translation resources and set it on the event. * * @param GetDatabaseResourcesEvent $event */ public function onGetDatabaseResources(GetDatabaseResourcesEvent $event) { // prevent errors on command such as cache:clear if doctrine schema has not been updated yet if (StorageInterface::STORAGE_ORM == $this->storageType && !$this->storage->translationsTablesExist()) { $resources = array(); } else { $resources = $this->storage->getTransUnitDomainsByLocale(); } $event->setResources($resources); }