mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-12-30 12:20:49 +01:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user