/** * Sets the location of a jobs * * @return $this * @throws \InvalidArgumentException */ protected function setLocation() { if (!isset($this->job)) { throw new \InvalidArgumentException('cannot create a viewModel for Templates without aa $job'); } $location = $this->job->getLocation(); $this->container['location'] = isset($location) ? $location : ''; return $this; }
/** * @testdox Allows setting the job location * @covers Jobs\Entity\Job::getLocation * @covers Jobs\Entity\Job::setLocation */ public function testSetGetLocation() { $location = 'Frankfurt am Main'; $this->target->setLocation($location); $this->assertEquals($location, $this->target->getLocation()); }
/** * @param Job $job * @return array */ public function dehydrate(Job $job) { return array('title' => $job->getTitle(), 'location' => $job->getLocation(), 'link' => $this->url->__invoke('lang/jobs/view', [], ['query' => ['id' => $job->getId()], 'force_canonical' => true]), 'organization' => array('name' => $job->getOrganization()->getOrganizationName()->getName()), 'template_values' => array('requirements' => $job->getTemplateValues()->getRequirements(), 'qualification' => $job->getTemplateValues()->getQualifications(), 'benefits' => $job->getTemplateValues()->getBenefits())); }