/** * Initialize all supporting entities */ protected function initSupportingEntities() { $this->contactGroups = $this->contactManager->getRepository('OroCRMContactBundle:Group')->findAll(); $this->contactSources = $this->contactManager->getRepository('OroCRMContactBundle:Source')->findAll(); $userStorageManager = $this->userManager->getStorageManager(); $this->users = $userStorageManager->getRepository('OroUserBundle:User')->findAll(); $this->countries = $userStorageManager->getRepository('OroAddressBundle:Country')->findAll(); $this->organization = $this->organizationManager->getRepository('OroOrganizationBundle:Organization')->getFirst(); }
/** * Flush objects * * @return void */ private function flush() { $this->userManager->getStorageManager()->flush(); }
protected function initSupportingEntities() { $this->em = $this->container->get('doctrine.orm.entity_manager'); $userStorageManager = $this->userManager->getStorageManager(); $this->users = $userStorageManager->getRepository('OroUserBundle:User')->findAll(); }