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