diff --git a/src/T4webNavigation/Menu/Entry.php b/src/T4webNavigation/Menu/Entry.php index d87778d..ac8e4fd 100644 --- a/src/T4webNavigation/Menu/Entry.php +++ b/src/T4webNavigation/Menu/Entry.php @@ -26,12 +26,18 @@ class Entry */ private $icon; - function __construct($label, $route, $icon = '', $params = []) + /** + * @var array + */ + private $query; + + function __construct($label, $route, $icon = '', $params = [], $query = []) { $this->label = $label; $this->route = $route; $this->icon = $icon; $this->params = $params; + $this->query = $query; } /** @@ -72,4 +78,12 @@ public function getIcon() return $this->icon; } + /** + * @return array + */ + public function getQuery() + { + return $this->query; + } + } \ No newline at end of file diff --git a/src/T4webNavigation/Menu/Navigator.php b/src/T4webNavigation/Menu/Navigator.php index c6f0cdd..cb1f631 100644 --- a/src/T4webNavigation/Menu/Navigator.php +++ b/src/T4webNavigation/Menu/Navigator.php @@ -45,6 +45,7 @@ private function prepare(array $config) 'label' => $entry->getLabel(), 'route' => $entry->getRoute(), 'params' => $entry->getParams(), + 'query' => $entry->getQuery(), 'icon' => $entry->getIcon() ]; @@ -54,6 +55,7 @@ private function prepare(array $config) 'label' => $subEntry->getLabel(), 'route' => $subEntry->getRoute(), 'params' => $subEntry->getParams(), + 'query' => $entry->getQuery(), 'icon' => $subEntry->getIcon() ]; }