public function hasCustomField($key)
    {
        if($key !== 'customFields' && !array_key_exists($key, $this->getAttributes())) {
            if(isset($this->customFields->$key)) {
                return true;
            }
        }
        return false;
    }
public function hasCustomField($key)
    {
        if($key !== 'customFields' && !array_key_exists($key, $this->getAttributes())) {
            if(isset($this->customFields->$key)) {
                return true;
            }
        }
        return false;
    }
public function hasCustomField ( $ key ) { if ( $ key !== 'customFields' && ! array_key_exists ( $ key , $ this -> getAttributes ( ) ) ) { if ( isset ( $ this -> customFields -> $ key ) ) { return true ; } } return false ; }
Check if a given key is a custom field.

@param  string $key
@return bool
Check if a given key is a custom field .