Example #1
0
 /**
  * @param TranslationInterface $translation
  */
 public function addTranslation(TranslationInterface $translation)
 {
     if (!$this->translations->containsKey($translation->getLocale())) {
         $this->translations->set($translation->getLocale(), $translation);
         $translation->setTranslatable($this);
     }
 }
Example #2
0
 /**
  * @param TranslationInterface $translation
  *
  * @return bool
  */
 public function hasTranslation(TranslationInterface $translation)
 {
     return $this->translations->containsKey($translation->getLocale());
 }