public function run(): string
    {
        if (null === $this->language) {
            throw new InvalidConfigException('Language model is not defined.');
        }

        if (strpos($this->name, '.') !== false) {

            $out = $this->getDataByPath($this->name);

        } else {
            $out = $this->model->{$this->name.'_'.$this->language->getShortName()};
        }

        return empty($out) ? $this->default : $out;
    }
public function run(): string
    {
        if (null === $this->language) {
            throw new InvalidConfigException('Language model is not defined.');
        }

        if (strpos($this->name, '.') !== false) {

            $out = $this->getDataByPath($this->name);

        } else {
            $out = $this->model->{$this->name.'_'.$this->language->getShortName()};
        }

        return empty($out) ? $this->default : $out;
    }
public function run ( ) : string { if ( null === $ this -> language ) { throw new InvalidConfigException ( 'Language model is not defined.' ) ; } if ( strpos ( $ this -> name , '.' ) !== false ) { $ out = $ this -> getDataByPath ( $ this -> name ) ; } else { $ out = $ this -> model -> { $ this -> name . '_' . $ this -> language -> getShortName ( ) } ; } return empty ( $ out ) ? $ this -> default : $ out ; }
Returns the translation of the field.

@throws InvalidConfigException

@return string
Returns the translation of the field .