public function testGetSetNotRelevant() { $this->assertFalse($this->instance->isNotRelevant()); $this->assertTrue($this->instance->setNotRelevant(true) instanceof Hindrances); $this->assertTrue($this->instance->isNotRelevant()); }
/** * @param Hindrances $hindrances * @param ParamFetcher $paramFetcher * @return Questionnaire * @throws \Exception */ public function updateHindrances(Hindrances $hindrances, ParamFetcher $paramFetcher) { $entityManager = $this->getEntityManager(); $hindrances->setNoTime($paramFetcher->get('time'))->setOtherPeople($paramFetcher->get('people'))->setInsecurity($paramFetcher->get('insecurity'))->setNoMoney($paramFetcher->get('money'))->setLackMotivation($paramFetcher->get('motivation'))->setNotRelevant($paramFetcher->get('relevant'))->setCompletedDate(new \DateTime()); $entityManager->persist($hindrances); $entityManager->flush($hindrances); return $this->getParentQuestionnaireForSection($hindrances); }
/** * @param Hindrances $hindrances * @return array */ public static function extractHindrances(Hindrances $hindrances) { return array("hindrancesNoTime" => true === $hindrances->isNoTime() ? "true" : "false", "hindrancesOtherPeople" => true === $hindrances->isOtherPeople() ? "true" : "false", "hindrancesInsecurity" => true === $hindrances->isInsecurity() ? "true" : "false", "hindrancesNoMoney" => true === $hindrances->isNoMoney() ? "true" : "false", "hindrancesNotImportant" => true === $hindrances->isLackMotivation() ? "true" : "false", "hindrancesNotRelevant" => true === $hindrances->isNotRelevant() ? "true" : "false", "hindrancesCompleted" => true === $hindrances->isCompleted() ? "true" : "false"); }
/** * @inheritdoc */ public function isCompleted() { return $this->feelings->isCompleted() && $this->hindrances->isCompleted() && $this->dependants->isCompleted() && $this->motivations->isCompleted(); }