Grav\Plugin\Admin\AdminController::taskContinue PHP Метод

taskContinue() публичный Метод

Continue to the new page.
public taskContinue ( ) : boolean
Результат boolean True if the action was performed.
    public function taskContinue()
    {
        $data = (array) $this->data;
        if ($this->view == 'users') {
            $username = strip_tags(strtolower($data['username']));
            $this->setRedirect("{$this->view}/{$username}");
            return true;
        }
        if ($this->view == 'groups') {
            $this->setRedirect("{$this->view}/{$data['groupname']}");
            return true;
        }
        if ($this->view != 'pages') {
            return false;
        }
        $route = $data['route'] != '/' ? $data['route'] : '';
        $folder = ltrim($data['folder'], '_');
        if (!empty($data['modular'])) {
            $folder = '_' . $folder;
        }
        $path = $route . '/' . $folder;
        $this->admin->session()->{$path} = $data;
        // Store the name and route of a page, to be used pre-filled 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;
    }