/**
  * assign the form-elements to the template
  * @param \Jobs\Entity\Job $job
  * @return $this
  */
 protected function extract($job)
 {
     $this->job = $job;
     $this->setApplyData();
     $this->setOrganizationInfo();
     $this->setLocation();
     $this->setDescription();
     $this->setTemplate();
     $this->setTemplateDefaultValues();
     $this->container['descriptionEditable'] = $job->getTemplateValues()->getDescription();
     $this->container['benefits'] = $job->getTemplateValues()->getBenefits();
     $this->container['requirements'] = $job->getTemplateValues()->getRequirements();
     $this->container['qualifications'] = $job->getTemplateValues()->getQualifications();
     $this->container['title'] = $job->getTemplateValues()->getTitle();
     $this->container['headTitle'] = strip_tags($job->getTemplateValues()->getTitle());
     $this->container['uriApply'] = $this->container['applyData']['uri'];
     $this->container['contactEmail'] = strip_tags($job->getContactEmail());
     return $this;
 }
Beispiel #2
0
 /**
  * @dataProvider provideTemplatesValuesData
  */
 public function testSetTemplateValues($input, $expected)
 {
     $this->target->setTemplateValues($input);
     $this->assertEquals($this->target->getTemplateValues(), $expected);
 }
 /**
  * @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()));
 }