public function getLanguageValues($asArray = null)
    {
        if (!$this->owner->getIsNewRecord() && $this->_languageValues === null) {
            $this->_languageValues = [];

            /* @var ActiveRecord $language */
            foreach ($this->owner->{$this->languageRelation} as $language) {
                $this->_languageValues[] = $language->getAttribute($this->languageValueAttribute);
            }
        }

        if ($asArray === null) {
            $asArray = $this->languageValuesAsArray;
        }

        if ($asArray) {
            return $this->_languageValues === null ? [] : $this->_languageValues;
        } else {
            return $this->_languageValues === null ? '' : implode(', ', $this->_languageValues);
        }
    }
public function getLanguageValues($asArray = null)
    {
        if (!$this->owner->getIsNewRecord() && $this->_languageValues === null) {
            $this->_languageValues = [];

            /* @var ActiveRecord $language */
            foreach ($this->owner->{$this->languageRelation} as $language) {
                $this->_languageValues[] = $language->getAttribute($this->languageValueAttribute);
            }
        }

        if ($asArray === null) {
            $asArray = $this->languageValuesAsArray;
        }

        if ($asArray) {
            return $this->_languageValues === null ? [] : $this->_languageValues;
        } else {
            return $this->_languageValues === null ? '' : implode(', ', $this->_languageValues);
        }
    }
public function getLanguageValues ( $ asArray = null ) { if ( ! $ this -> owner -> getIsNewRecord ( ) && $ this -> _languageValues === null ) { $ this -> _languageValues = [ ] ; /* @var ActiveRecord $language */ foreach ( $ this -> owner -> { $ this -> languageRelation } as $ language ) { $ this -> _languageValues [ ] = $ language -> getAttribute ( $ this -> languageValueAttribute ) ; } } if ( $ asArray === null ) { $ asArray = $ this -> languageValuesAsArray ; } if ( $ asArray ) { return $ this -> _languageValues === null ? [ ] : $ this -> _languageValues ; } else { return $ this -> _languageValues === null ? '' : implode ( ', ' , $ this -> _languageValues ) ; } }
Returns languages.
@param boolean|null $asArray
@return string|string[]
Returns languages .