Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GeneratorBundle]: update menuadaptor to correct syntax #1044

Merged
merged 1 commit into from
Mar 1, 2016

Conversation

sandergo90
Copy link
Contributor

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Fixed tickets

}

public function adaptChildren(MenuBuilder $menu, array &$children, MenuItem $parent = null, Request $request = null)
{
$overviewPageNodes = $this->em->getRepository('KunstmaanNodeBundle:Node')->findByRefEntityName('{{ namespace|replace({"\\": "\\\\"}) }}\\Entity\\Pages\\{{ entity_class }}OverviewPage');
foreach ($overviewPageNodes as $overviewPageNode) {
$this->overviewpageIds[] = $overviewPageNode->getId();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The overviewpageIds should be cached in private class variable because the adaptChildren is called multiple times

@sandergo90 sandergo90 force-pushed the menuadaptor branch 2 times, most recently from d946575 to eafc62a Compare March 1, 2016 11:16
[MenuAdaptor]: fill overviewpageids only once

Set overviewpageids to null
jockri pushed a commit that referenced this pull request Mar 1, 2016
[GeneratorBundle]: update menuadaptor to correct syntax
@jockri jockri merged commit bd82087 into Kunstmaan:master Mar 1, 2016
@jockri jockri added this to the 3.5.1 milestone Mar 1, 2016
@sandergo90 sandergo90 deleted the menuadaptor branch July 7, 2016 06:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants