public function updateBean($data)
    {
        if ($this->currentBean ==null) {
            throw new NoBeanException();
        }

        $result = $this->saveBean($this->currentBean, $data);

        // Return result
        if (empty($result->msg)) {
            $result->msg = "Saved.";
            $result->class = "callout-info";
        } else {
            $result->class = "callout-danger";
        }

        if ($this->afterUpdateBean != null) {
            $callable = $this->afterUpdateBean;
            $callable($this->currentBean, $result);
        }

        return $result;
    }
public function updateBean($data)
    {
        if ($this->currentBean ==null) {
            throw new NoBeanException();
        }

        $result = $this->saveBean($this->currentBean, $data);

        // Return result
        if (empty($result->msg)) {
            $result->msg = "Saved.";
            $result->class = "callout-info";
        } else {
            $result->class = "callout-danger";
        }

        if ($this->afterUpdateBean != null) {
            $callable = $this->afterUpdateBean;
            $callable($this->currentBean, $result);
        }

        return $result;
    }
public function updateBean ( $ data ) { if ( $ this -> currentBean == null ) { throw new NoBeanException ( ) ; } $ result = $ this -> saveBean ( $ this -> currentBean , $ data ) ; // Return result if ( empty ( $ result -> msg ) ) { $ result -> msg = "Saved." ; $ result -> class = "callout-info" ; } else { $ result -> class = "callout-danger" ; } if ( $ this -> afterUpdateBean != null ) { $ callable = $ this -> afterUpdateBean ; $ callable ( $ this -> currentBean , $ result ) ; } return $ result ; }
Update a bean.
@param $data
@return Result
@throws NoBeanException
Update a bean .