NodesController::admin_update_paths PHP Method

admin_update_paths() public method

Admin update paths
public admin_update_paths ( ) : void
return void
    public function admin_update_paths()
    {
        $Node = $this->{$this->modelClass};
        if ($Node->updateAllNodesPaths()) {
            $messageFlash = __d('croogo', 'Paths updated.');
            $class = 'success';
        } else {
            $messageFlash = __d('croogo', 'Something went wrong while updating paths.' . "\n" . 'Please try again');
            $class = 'error';
        }
        $this->Session->setFlash($messageFlash, 'flash', compact('class'));
        return $this->redirect(array('action' => 'index'));
    }