public function edit($id = null)
    {
        $category = $this->PagesCategories->get($id);

        if ($this->request->is(['patch', 'post', 'put'])) {
            $category = $this->PagesCategories->patchEntity($category, $this->request->getData());

            if ($this->PagesCategories->save($category)) {
                $this->Flash->success(I18N_OPERATION_OK);

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

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

        $this->set(compact('category'));
    }
public function edit($id = null)
    {
        $category = $this->PagesCategories->get($id);

        if ($this->request->is(['patch', 'post', 'put'])) {
            $category = $this->PagesCategories->patchEntity($category, $this->request->getData());

            if ($this->PagesCategories->save($category)) {
                $this->Flash->success(I18N_OPERATION_OK);

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

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

        $this->set(compact('category'));
    }
public function edit ( $ id = null ) { $ category = $ this -> PagesCategories -> get ( $ id ) ; if ( $ this -> request -> is ( [ 'patch' , 'post' , 'put' ] ) ) { $ category = $ this -> PagesCategories -> patchEntity ( $ category , $ this -> request -> getData ( ) ) ; if ( $ this -> PagesCategories -> save ( $ category ) ) { $ this -> Flash -> success ( I18N_OPERATION_OK ) ; return $ this -> redirect ( [ 'action' => 'index' ] ) ; } $ this -> Flash -> error ( I18N_OPERATION_NOT_OK ) ; } $ this -> set ( compact ( 'category' ) ) ; }
Edits pages category
@param string $id Pages category ID
@return \Cake\Network\Response|null|void
Edits pages category