public function changeAction(ChangeCollection $changes)
    {
        try {
            $count = $changes->count();
            $changes->apply();

            $success = new Info();
            $success->setMessage(sprintf('%d change(s) successfully applied.', $count));

            $this->feedbackCollection->add($success);
            $this->persistenceManager->persistAll();
        } catch (\Exception $e) {
            $error = new Error();
            $error->setMessage($e->getMessage());

            $this->feedbackCollection->add($error);
        }

        $this->view->assign('value', $this->feedbackCollection);
    }
public function changeAction(ChangeCollection $changes)
    {
        try {
            $count = $changes->count();
            $changes->apply();

            $success = new Info();
            $success->setMessage(sprintf('%d change(s) successfully applied.', $count));

            $this->feedbackCollection->add($success);
            $this->persistenceManager->persistAll();
        } catch (\Exception $e) {
            $error = new Error();
            $error->setMessage($e->getMessage());

            $this->feedbackCollection->add($error);
        }

        $this->view->assign('value', $this->feedbackCollection);
    }
public function changeAction ( ChangeCollection $ changes ) { try { $ count = $ changes -> count ( ) ; $ changes -> apply ( ) ; $ success = new Info ( ) ; $ success -> setMessage ( sprintf ( '%d change(s) successfully applied.' , $ count ) ) ; $ this -> feedbackCollection -> add ( $ success ) ; $ this -> persistenceManager -> persistAll ( ) ; } catch ( \ Exception $ e ) { $ error = new Error ( ) ; $ error -> setMessage ( $ e -> getMessage ( ) ) ; $ this -> feedbackCollection -> add ( $ error ) ; } $ this -> view -> assign ( 'value' , $ this -> feedbackCollection ) ; }
Apply a set of changes to the system

@param ChangeCollection $changes
@return void
Apply a set of changes to the system