src/actions/Action.php
public function perform()
    {
        $this->beforePerform();

        $this->loadCollection();

        try {
            $error = !$this->saveCollection();

            if ($error === true && $this->collection->hasErrors()) {
                $error = $this->collection->getFirstError();
            }
        } catch (ResponseErrorException $e) {
            $error = $e->getMessage();
        } catch (InvalidCallException $e) {
            $error = $e->getMessage();
        }

        $this->afterPerform();

        return $error;
    }
public function perform()
    {
        $this->beforePerform();

        $this->loadCollection();

        try {
            $error = !$this->saveCollection();

            if ($error === true && $this->collection->hasErrors()) {
                $error = $this->collection->getFirstError();
            }
        } catch (ResponseErrorException $e) {
            $error = $e->getMessage();
        } catch (InvalidCallException $e) {
            $error = $e->getMessage();
        }

        $this->afterPerform();

        return $error;
    }
public function perform ( ) { $ this -> beforePerform ( ) ; $ this -> loadCollection ( ) ; try { $ error = ! $ this -> saveCollection ( ) ; if ( $ error === true && $ this -> collection -> hasErrors ( ) ) { $ error = $ this -> collection -> getFirstError ( ) ; } } catch ( ResponseErrorException $ e ) { $ error = $ e -> getMessage ( ) ; } catch ( InvalidCallException $ e ) { $ error = $ e -> getMessage ( ) ; } $ this -> afterPerform ( ) ; return $ error ; }
Performs action.

@return boolean|string Whether save is success
- boolean true or sting - an error
- false - no errors
Performs action .