-
Notifications
You must be signed in to change notification settings - Fork 2.5k
fix getHref strategy in PageMvc #4282
fix getHref strategy in PageMvc #4282
Conversation
A couple comments:
|
OK, I renamed it to underscore. |
You hadn't mentioned that in the description. :) If that's the case, then I'd argue the boolean |
@weierophinney Yeah, really, there should be applied more standards(I did fast fix for compatibility). Do you agree that default value of this param should be false? |
ViewHelper has camel-case options - http://zf2.readthedocs.org/en/latest/modules/zend.navigation.view.helper.menu.html. So I propose to set 'useRouteMath' param to camel-cased too. |
@vnagara Ugh -- thought we'd refactored all those before 2.0. Since we didn't, keep the casing consistent within the component. As for the default value of the parameter -- the default should be whatever value will keep the original behavior prior to the changes in 2.1.5. The configuration value can then be passed when somebody wants to override the behavior. |
@weierophinney done |
*/ | ||
public function setUseRouteMatch($useRoteMatch = true) | ||
{ | ||
$this->useRouteMatch = (bool) $useRoteMatch; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/Rote/Route/g
(I can do this on merge.)
Looks good -- I'll make the changes I've noted in suggestions already as I merge. |
fix getHref strategy in PageMvc
- s/roteMatch/routeMatch/g - s/getUseRouteMatch/useRouteMatch/g
@weierophinney Thank |
@weierophinney yes, this PR resolves #4095 bug. But also restores the old behaviour, deleting #4095 intentions, in fact I suggest to @adamlundrigan to play better with breadcrumbs view helper to reach his goal; now there's no more need to change |
@Slamdunk The goal was to restore the pre-2.1.5 behavior, so it sounds like that has happened. It also allows the same behavior that @adamlundrigan was trying to achieve via a flag. |
Exactly what I mean and what It's needed 😄 |
…getHref-strategy-in-PageMvc fix getHref strategy in PageMvc
- s/roteMatch/routeMatch/g - s/getUseRouteMatch/useRouteMatch/g
I was caused by problem which breaks menu link dependent from which page it was generated.
As example in one router I have default action 'list' in another - 'view'. Current getHref function replace proper default action parameter with broken from route match.
Also if I will add some new defaults then I should has to fix all entrances in navigation array.