public function createAction()
    {
        $this->initializeScaffolding();
        $this->checkRequest();

        try {
            $this->beforeCreate();
            $this->scaffolding->doCreate($this->request->getPost());
            $this->flash->success($this->successMessage);
            return $this->afterCreate();
        } catch (Exception $e) {
            $this->flash->error($e->getMessage());
            $this->afterCreateException();
        }

        return $this->dispatcher->forward(['action' => 'new']);
    }
public function createAction()
    {
        $this->initializeScaffolding();
        $this->checkRequest();

        try {
            $this->beforeCreate();
            $this->scaffolding->doCreate($this->request->getPost());
            $this->flash->success($this->successMessage);
            return $this->afterCreate();
        } catch (Exception $e) {
            $this->flash->error($e->getMessage());
            $this->afterCreateException();
        }

        return $this->dispatcher->forward(['action' => 'new']);
    }
public function createAction ( ) { $ this -> initializeScaffolding ( ) ; $ this -> checkRequest ( ) ; try { $ this -> beforeCreate ( ) ; $ this -> scaffolding -> doCreate ( $ this -> request -> getPost ( ) ) ; $ this -> flash -> success ( $ this -> successMessage ) ; return $ this -> afterCreate ( ) ; } catch ( Exception $ e ) { $ this -> flash -> error ( $ e -> getMessage ( ) ) ; $ this -> afterCreateException ( ) ; } return $ this -> dispatcher -> forward ( [ 'action' => 'new' ] ) ; }
Creates new record

@ACL(name="create", inherit='new')
@return mixed
Creates new record