Exemplo n.º 1
0
 /**
  * @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;
 }
Exemplo n.º 2
0
 /**
  * @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);
 }
Exemplo n.º 3
0
 /**
  * Removes a thematic.
  *
  * @param Thematic $thematic
  * @return $this For fluid purposes.
  */
 public function removeThematic(Thematic $thematic)
 {
     $this->thematics->removeElement($thematic);
     return $this;
 }