1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

[ticket/15289] Update acp storage

PHPBB3-15289
This commit is contained in:
Rubén Calvo
2017-08-05 21:06:24 +02:00
parent f36a6d845d
commit c5f3dec2f2
4 changed files with 168 additions and 36 deletions

View File

@@ -86,6 +86,7 @@ class extension extends \Twig_Extension
return array(
new \Twig_SimpleFunction('lang', array($this, 'lang')),
new \Twig_SimpleFunction('lang_defined', array($this, 'lang_defined')),
new \Twig_SimpleFunction('get_class', array($this, 'get_class')),
);
}
@@ -185,12 +186,24 @@ class extension extends \Twig_Extension
}
/**
* Check if a language variable exists
*
* @return bool
*/
* Check if a language variable exists
*
* @return bool
*/
public function lang_defined($key)
{
return call_user_func_array([$this->language, 'is_set'], [$key]);
}
/*
* Returns the name of the class of an object
*
* @param object $object The object
*
* @return string
*/
public function get_class($object)
{
return get_class($object);
}
}