public function infoAction() { $user = $this->authenticationManager->getSecurityContext()->getAccount()->getParty(); $val['user'] = $user; $val['locations'] = $user->getAviableLocations(); $val['species'] = $this->speciesRepository->findAll(); $val['colors'] = $this->colorRepository->findAll(); $this->view->assign('value', $val); $this->view->setConfiguration(array("value" => array("user" => array("_exposeObjectIdentifier" => TRUE), "locations" => array("_descendAll" => array("_exposeObjectIdentifier" => TRUE)), "species" => array("_descendAll" => array("_exposeObjectIdentifier" => TRUE, "_descend" => array("breads" => array("_exposeObjectIdentifier" => TRUE)))), "colors" => array("_descendAll" => array("_exposeObjectIdentifier" => TRUE))))); }
/** * @param \DLigo\Animaltool\Domain\Model\Animal $animal * @Flow\IgnoreValidation (argumentName="$animal") * @return void */ public function treatmentAction(Animal $animal) { $this->response->setHeader('no-store', true); $this->response->setHeader('no-cache', true); $this->view->assign('healthConditions', $animal->getHealthConditions()); $this->view->assign('breads', $this->breadRepository->findBySpecies($animal->getSpecies())); $this->view->assign('colors', $this->colorRepository->findAll()); $this->view->assign('genders', $animal->getGenders()); $this->view->assign('doctors', $this->userRepository->findByRoles(array('DLigo.Animaltool:Doctor'))); $ts = $this->therapyRepository->findAll(); $therapies = array(); foreach ($ts as $t) { $therapies[$this->persistenceManager->getIdentifierByObject($t)] = $t; } $this->view->assign('therapies', $therapies); $this->view->assign('animal', $animal); }