NodesController::admin_moveup PHP Method

admin_moveup() public method

Move a node up when scoped to Content type
public admin_moveup ( integer $id, integer $step = 1 ) : void
$id integer Node id
$step integer Step
return void
    public function admin_moveup($id, $step = 1)
    {
        if ($this->Node->moveUp($id, $step)) {
            $this->Session->setFlash(__d('croogo', 'Moved up successfully'), 'flash', array('class' => 'success'));
        } else {
            $this->Session->setFlash(__d('croogo', 'Could not move up'), 'flash', array('class' => 'error'));
        }
        return $this->redirect($this->referer());
    }