public function customFieldValue($key)
    {
        $value = null;
        if($this->hasCustomField($key)) {
            //if translate is enabled in a specific language
            if(isset($this->customFields->$key->{$this->getTranslateLanguage()})) {
                $value = $this->customFields->$key->{$this->getTranslateLanguage()};
            }
            else {
                $value = $this->customFields->$key;
            }
        }

        //rollback to default language
        $this->resetTranslateLanguage();

        return $value;
    }
public function customFieldValue($key)
    {
        $value = null;
        if($this->hasCustomField($key)) {
            //if translate is enabled in a specific language
            if(isset($this->customFields->$key->{$this->getTranslateLanguage()})) {
                $value = $this->customFields->$key->{$this->getTranslateLanguage()};
            }
            else {
                $value = $this->customFields->$key;
            }
        }

        //rollback to default language
        $this->resetTranslateLanguage();

        return $value;
    }
public function customFieldValue ( $ key ) { $ value = null ; if ( $ this -> hasCustomField ( $ key ) ) { //if translate is enabled in a specific language if ( isset ( $ this -> customFields -> $ key -> { $ this -> getTranslateLanguage ( ) } ) ) { $ value = $ this -> customFields -> $ key -> { $ this -> getTranslateLanguage ( ) } ; } else { $ value = $ this -> customFields -> $ key ; } } //rollback to default language $ this -> resetTranslateLanguage ( ) ; return $ value ; }
Get custom field value by key.

@param  string $key
@return mixed
Get custom field value by key .