public function loadWithTranslations($data, $languages, $formName = null, $translationFormName = null)
    {
        if ($this->owner->load($data, $formName)) {
            if (!$languages) {
                throw new InvalidParamException('Languages must be set.');
            }
            foreach ($languages as $language) {
                $modelI18n = static::getTranslation($language);
                $modelI18n->load($data, $translationFormName);
            }
            return true;
        }
        return false;
    }
public function loadWithTranslations($data, $languages, $formName = null, $translationFormName = null)
    {
        if ($this->owner->load($data, $formName)) {
            if (!$languages) {
                throw new InvalidParamException('Languages must be set.');
            }
            foreach ($languages as $language) {
                $modelI18n = static::getTranslation($language);
                $modelI18n->load($data, $translationFormName);
            }
            return true;
        }
        return false;
    }
public function loadWithTranslations ( $ data , $ languages , $ formName = null , $ translationFormName = null ) { if ( $ this -> owner -> load ( $ data , $ formName ) ) { if ( ! $ languages ) { throw new InvalidParamException ( 'Languages must be set.' ) ; } foreach ( $ languages as $ language ) { $ modelI18n = static :: getTranslation ( $ language ) ; $ modelI18n -> load ( $ data , $ translationFormName ) ; } return true ; } return false ; }
Load owner model and translation models from data.
@param $data
@param null $languages array of languages for loading
@param null $formName
@param null $translationFormName
@return bool
Load owner model and translation models from data .