/** * @param ImportedLabel $source * @param Thematic $destination * @return mixed */ public function map($source, $destination) { $destination->setArtsysID($source->getId()); $translations = array('fr' => $source->getFr(), 'en' => $source->getEn(), 'de' => $source->getDe(), 'es' => $source->getEs(), 'it' => $source->getIt(), 'nl' => $source->getNl()); $this->translateProperty($destination, 'name', $translations); return $destination; }
/** * @param Thematic $thematic * @return bool|string */ public function generateThematicUrl(Thematic $thematic, $lang = null, $absolute = false) { if ($lang === null) { $lang = $this->context->get('language'); } return $this->router->generate('destination_sheet_thematic', array('slugThematic' => $thematic->getSlug(), 'locale' => $lang), $absolute); }
/** * Removes a thematic. * * @param Thematic $thematic * @return $this For fluid purposes. */ public function removeThematic(Thematic $thematic) { $this->thematics->removeElement($thematic); return $this; }