summaryrefslogtreecommitdiff
path: root/app/Controller/Base.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Controller/Base.php')
-rw-r--r--app/Controller/Base.php24
1 files changed, 4 insertions, 20 deletions
diff --git a/app/Controller/Base.php b/app/Controller/Base.php
index 19eb7f12..18f21ee8 100644
--- a/app/Controller/Base.php
+++ b/app/Controller/Base.php
@@ -17,6 +17,8 @@ use Symfony\Component\EventDispatcher\Event;
* @package controller
* @author Frederic Guillot
*
+ * @property \Core\Session $session
+ * @property \Core\Template $template
* @property \Model\Acl $acl
* @property \Model\Authentication $authentication
* @property \Model\Action $action
@@ -70,22 +72,6 @@ abstract class Base
protected $response;
/**
- * Template instance
- *
- * @accesss protected
- * @var \Core\Template
- */
- protected $template;
-
- /**
- * Session instance
- *
- * @accesss public
- * @var \Core\Session
- */
- protected $session;
-
- /**
* Container instance
*
* @access private
@@ -104,8 +90,6 @@ abstract class Base
$this->container = $container;
$this->request = new Request;
$this->response = new Response;
- $this->session = new Session;
- $this->template = new Template;
}
/**
@@ -265,7 +249,7 @@ abstract class Base
$params['hide_remove_menu'] = true;
}
- $content = $this->template->load($template, $params);
+ $content = $this->template->render($template, $params);
$params['task_content_for_layout'] = $content;
$params['title'] = $params['task']['project_name'].' > '.$params['task']['title'];
$params['board_selector'] = $this->projectPermission->getAllowedProjects($this->acl->getUserId());
@@ -283,7 +267,7 @@ abstract class Base
*/
protected function projectLayout($template, array $params)
{
- $content = $this->template->load($template, $params);
+ $content = $this->template->render($template, $params);
$params['project_content_for_layout'] = $content;
$params['title'] = $params['project']['name'] === $params['title'] ? $params['title'] : $params['project']['name'].' > '.$params['title'];
$params['board_selector'] = $this->projectPermission->getAllowedProjects($this->acl->getUserId());