Add static helper methods to be used by the new page blueprints, and store the information in the session when creating a new page

This commit is contained in:
Flavio Copes
2015-10-01 15:33:33 +02:00
parent 4fac3d951c
commit d2daa17352
2 changed files with 25 additions and 0 deletions

View File

@@ -1030,6 +1030,11 @@ class AdminController
$path = $route . '/' . $folder;
$this->admin->session()->{$path} = $data;
// Store the name and route of a page, to be used prefilled defaults of the form in the future
$this->admin->session()->lastPageName = $data['name'];
$this->admin->session()->lastPageRoute = $data['route'];
$this->setRedirect("{$this->view}/". ltrim($path, '/'));
return true;