Forum\Controller\Post\SaveController::getSuccessRedirect PHP Method

getSuccessRedirect() protected method

getSuccessRedirect
protected getSuccessRedirect ( Windwalker\Data\Data $data = null ) : string
$data Windwalker\Data\Data
return string
    protected function getSuccessRedirect(Data $data = null)
    {
        if ($this->input->get('hmvc')) {
            return '';
        }
        // Count last pages
        $post = $this->model->getItem($data->id);
        $limit = $this->app->get('post.limit', 15);
        $page = floor($post->ordering / $limit + 1);
        return $this->router->http('topic', array($this->pkName => $data->topic_id, 'path' => $this->category->path, 'page' => $page), Router::TYPE_FULL) . '#reply-' . $post->id;
    }