mirror of
https://github.com/getgrav/grav.git
synced 2025-02-20 19:56:53 +01:00
Add variable-length argument list to GravExtension::translate()
This commit is contained in:
parent
ae8dfde69d
commit
6b70826961
|
|
@ -838,12 +838,8 @@ class GravExtension extends AbstractExtension implements GlobalsInterface
|
|||
* @param Environment $twig
|
||||
* @return string
|
||||
*/
|
||||
public function translate(Environment $twig)
|
||||
public function translate(Environment $twig, ...$args)
|
||||
{
|
||||
// shift off the environment
|
||||
$args = func_get_args();
|
||||
array_shift($args);
|
||||
|
||||
// If admin and tu filter provided, use it
|
||||
if (isset($this->grav['admin'])) {
|
||||
$numargs = count($args);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user