Skip to content

Commit

Permalink
Merge pull request #352 from PBWebMedia/treat-underscored-variabled-a…
Browse files Browse the repository at this point in the history
…s-hidden

Hide underscores parameters from the url. Underscored variables shoul…
  • Loading branch information
l3pp4rd committed Apr 20, 2016
2 parents 2e66942 + 0973644 commit c988761
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Subscriber/SlidingPaginationSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ public function onKernelRequest(GetResponseEvent $event)

$this->route = $request->attributes->get('_route');
$this->params = array_merge($request->query->all(), $request->attributes->get('_route_params', array()));
foreach ($this->params as $key => $param) {
if (substr($key, 0, 1) == '_') {
unset($this->params[$key]);
}
}
}

public function pagination(PaginationEvent $event)
Expand Down

0 comments on commit c988761

Please sign in to comment.