mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-14 04:34:07 +02:00
[ticket/16204] Remove hooks system
PHPBB3-16204
This commit is contained in:
@@ -168,26 +168,4 @@ abstract class base implements template
|
||||
{
|
||||
return $this->context->find_key_index($blockname, $key);
|
||||
}
|
||||
|
||||
/**
|
||||
* Calls hook if any is defined.
|
||||
*
|
||||
* @param string $handle Template handle being displayed.
|
||||
* @param string $method Method name of the caller.
|
||||
*/
|
||||
protected function call_hook($handle, $method)
|
||||
{
|
||||
global $phpbb_hook;
|
||||
|
||||
if (!empty($phpbb_hook) && $phpbb_hook->call_hook(array('template', $method), $handle, $this))
|
||||
{
|
||||
if ($phpbb_hook->hook_return(array('template', $method)))
|
||||
{
|
||||
$result = $phpbb_hook->hook_return_result(array('template', $method));
|
||||
return array($result);
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@@ -308,12 +308,6 @@ class twig extends \phpbb\template\base
|
||||
*/
|
||||
public function display($handle)
|
||||
{
|
||||
$result = $this->call_hook($handle, __FUNCTION__);
|
||||
if ($result !== false)
|
||||
{
|
||||
return $result[0];
|
||||
}
|
||||
|
||||
$this->twig->display($this->get_filename_from_handle($handle), $this->get_template_vars());
|
||||
|
||||
return $this;
|
||||
|
Reference in New Issue
Block a user