updatePage() public method

Validates and updates a page with the given input
public updatePage ( integer $id, array $input ) : boolean
$id integer
$input array
return boolean
Beispiel #1
0
 /**
  * Request page be updated with given input
  *
  * @param  integer $id
  * @param  array   $input
  * @return Redirector
  */
 public function requestUpdatePage($id, $input)
 {
     $page = $this->PageManager->updatePage($id, $input);
     if ($page) {
         return $this->Redirect->route('dvs-pages')->with('warnings', $this->PageManager->warnings)->with('message', $this->PageManager->message);
     }
     return $this->Redirect->route('dvs-pages-edit', $id)->withInput()->withErrors($this->PageManager->errors)->with('message', $this->PageManager->message);
 }