diff --git a/README.md b/README.md index 716749d..1381976 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,8 @@ This component exposes a custom `path_for()` function to your Twig templates. Yo {% block body %}

User List

{% endblock %} diff --git a/src/TwigExtension.php b/src/TwigExtension.php index 43df113..9b2f12e 100644 --- a/src/TwigExtension.php +++ b/src/TwigExtension.php @@ -55,9 +55,9 @@ public function baseUrl() } } - public function isCurrentPath($name) + public function isCurrentPath($name, $data = []) { - return $this->router->pathFor($name) === $this->uri->getPath(); + return $this->router->pathFor($name, $data) === $this->uri->getPath(); } /**