public function getDefaultFromData($data)
    {
        if ($this->defaultFrom) {
            return $this->getFieldNameFromData($this->defaultFrom, $data);
        }

        if ($this->defaults !== '') {
            return $this->defaults;
        }

        return null;
    }
public function getDefaultFromData($data)
    {
        if ($this->defaultFrom) {
            return $this->getFieldNameFromData($this->defaultFrom, $data);
        }

        if ($this->defaults !== '') {
            return $this->defaults;
        }

        return null;
    }
public function getDefaultFromData ( $ data ) { if ( $ this -> defaultFrom ) { return $ this -> getFieldNameFromData ( $ this -> defaultFrom , $ data ) ; } if ( $ this -> defaults !== '' ) { return $ this -> defaults ; } return null ; }
Returns the default value for this field, the supplied data is used
to source data when defaultFrom is specified.
@param mixed $data
@return mixed
Returns the default value for this field the supplied data is used to source data when defaultFrom is specified .