private function loadTranslations()
    {
        if ($related = $this->owner->{$this->relation}) {
            if (is_array($related)) {
                foreach ($related as $model) {
                    $this->_models[$model->getAttribute($this->languageAttribute)] = $model;
                }
            } else {
                $model = $related;
                $this->_models[$model->getAttribute($this->languageAttribute)] = $model;
            }
            return true;
        }
        return false;
    }
private function loadTranslations()
    {
        if ($related = $this->owner->{$this->relation}) {
            if (is_array($related)) {
                foreach ($related as $model) {
                    $this->_models[$model->getAttribute($this->languageAttribute)] = $model;
                }
            } else {
                $model = $related;
                $this->_models[$model->getAttribute($this->languageAttribute)] = $model;
            }
            return true;
        }
        return false;
    }
private function loadTranslations ( ) { if ( $ related = $ this -> owner -> { $ this -> relation } ) { if ( is_array ( $ related ) ) { foreach ( $ related as $ model ) { $ this -> _models [ $ model -> getAttribute ( $ this -> languageAttribute ) ] = $ model ; } } else { $ model = $ related ; $ this -> _models [ $ model -> getAttribute ( $ this -> languageAttribute ) ] = $ model ; } return true ; } return false ; }
Loads relation to models
@return bool
Loads relation to models