Model/TransUnit.php
public function setTranslations(Collection $collection)
    {
        $this->translations = new ArrayCollection();

        foreach ($collection as $translation) {
            $this->addTranslation($translation);
        }
    }
public function setTranslations(Collection $collection)
    {
        $this->translations = new ArrayCollection();

        foreach ($collection as $translation) {
            $this->addTranslation($translation);
        }
    }
public function setTranslations ( Collection $ collection ) { $ this -> translations = new ArrayCollection ( ) ; foreach ( $ collection as $ translation ) { $ this -> addTranslation ( $ translation ) ; } }
Set translations collection

@param Collection $collection
Set translations collection