public function add()
    {
        $backup = new BackupForm;

        if ($this->request->is('post')) {
            //Creates the backup
            if ($backup->execute($this->request->getData())) {
                $this->Flash->success(I18N_OPERATION_OK);

                return $this->redirect(['action' => 'index']);
            }

            $this->Flash->error(I18N_OPERATION_NOT_OK);
        }

        $this->set(compact('backup'));
    }
public function add()
    {
        $backup = new BackupForm;

        if ($this->request->is('post')) {
            //Creates the backup
            if ($backup->execute($this->request->getData())) {
                $this->Flash->success(I18N_OPERATION_OK);

                return $this->redirect(['action' => 'index']);
            }

            $this->Flash->error(I18N_OPERATION_NOT_OK);
        }

        $this->set(compact('backup'));
    }
public function add ( ) { $ backup = new BackupForm ; if ( $ this -> request -> is ( 'post' ) ) { //Creates the backup if ( $ backup -> execute ( $ this -> request -> getData ( ) ) ) { $ this -> Flash -> success ( I18N_OPERATION_OK ) ; return $ this -> redirect ( [ 'action' => 'index' ] ) ; } $ this -> Flash -> error ( I18N_OPERATION_NOT_OK ) ; } $ this -> set ( compact ( 'backup' ) ) ; }
Adds a backup file
@return \Cake\Network\Response|null|void
@see MeCms\Form\BackupForm
@see MeCms\Form\BackupForm::execute()
Adds a backup file