1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-26 09:44:26 +02:00

[ticket/16977] Move HTML rendering logic to template

PHPBB3-16977
This commit is contained in:
lionel-rowe
2022-04-02 18:10:53 +01:00
parent 8c982c7aa0
commit 87c1e631ef
7 changed files with 49 additions and 10 deletions

View File

@@ -59,6 +59,11 @@ class manager
*/
protected $php_ext;
/**
* @var \phpbb\template\template
*/
protected $template;
/**
* Constructor. Loads all available tasks.
*
@@ -66,13 +71,15 @@ class manager
* @param helper $routing_helper Routing helper
* @param string $phpbb_root_path Relative path to phpBB root
* @param string $php_ext PHP file extension
* @param \phpbb\template\template $template
*/
public function __construct(ContainerInterface $phpbb_container, helper $routing_helper, $phpbb_root_path, $php_ext)
public function __construct(ContainerInterface $phpbb_container, helper $routing_helper, $phpbb_root_path, $php_ext, $template)
{
$this->phpbb_container = $phpbb_container;
$this->routing_helper = $routing_helper;
$this->phpbb_root_path = $phpbb_root_path;
$this->php_ext = $php_ext;
$this->template = $template;
}
/**
@@ -193,6 +200,6 @@ class manager
*/
public function wrap_task(\phpbb\cron\task\task $task)
{
return new wrapper($task, $this->routing_helper, $this->phpbb_root_path, $this->php_ext);
return new wrapper($task, $this->routing_helper, $this->phpbb_root_path, $this->php_ext, $this->template);
}
}