public function getValue($componentName, $default = null)
    {
        // Try to get fresh submitted value ...
        $value = $this->getSubmittedValue($componentName);

        // If not received try to load from pool ...
        if (
            null === $value ||
            (
                true === is_array($value) &&
                true === array_key_exists('error', $value) &&
                $value['error'] !== UPLOAD_ERR_OK
            )
        ) {
            $value = $this->getPoolValue($componentName, $this->getStep());
        }

        // Still not received? assign default
        if (null === $value) {
            $value = $default;
        }

        return $value;
    }
public function getValue($componentName, $default = null)
    {
        // Try to get fresh submitted value ...
        $value = $this->getSubmittedValue($componentName);

        // If not received try to load from pool ...
        if (
            null === $value ||
            (
                true === is_array($value) &&
                true === array_key_exists('error', $value) &&
                $value['error'] !== UPLOAD_ERR_OK
            )
        ) {
            $value = $this->getPoolValue($componentName, $this->getStep());
        }

        // Still not received? assign default
        if (null === $value) {
            $value = $default;
        }

        return $value;
    }
public function getValue ( $ componentName , $ default = null ) { // Try to get fresh submitted value ... $ value = $ this -> getSubmittedValue ( $ componentName ) ; // If not received try to load from pool ... if ( null === $ value || ( true === is_array ( $ value ) && true === array_key_exists ( 'error' , $ value ) && $ value [ 'error' ] !== UPLOAD_ERR_OK ) ) { $ value = $ this -> getPoolValue ( $ componentName , $ this -> getStep ( ) ) ; } // Still not received? assign default if ( null === $ value ) { $ value = $ default ; } return $ value ; }
Returns the submitted value for a passed fieldname or the default value if the field wasn't submitted not
submitted.

@param string      $componentName The name of the component to return data for
@param string|null $default       The default return value as string or NULL

@author Benjamin Carl <opensource@clickalicious.de>

@return mixed The value of the component if exist, otherwise the $default value
Returns the submitted value for a passed fieldname or the default value if the field wasn t submitted not submitted .