Skip to content

[Insight] What is the purpose of the cloneView function ? - in Bundle/CoreBundle/Helper/ViewHelper.php, line 125 #249

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

Closed
talbotseb opened this issue Oct 23, 2015 · 0 comments

Comments

@talbotseb
Copy link

The function cloneView seems to be useless, should it be removed or refactor ?

in Bundle/CoreBundle/Helper/ViewHelper.php, line 150

The WidgetLayout class resolves to the Victoire\Bundle\CoreBundle\Helper\WidgetLayout class which PHP does not seem to be able to autoload.

                $clonedWidget->setId(null);
                $clonedWidget->setView($clonedView);
                $this->em->persist($clonedWidget);
                $newWidgets[] = $clonedWidget;
                $arrayMapOfWidgetMap[$widgetVal->getId()] = $clonedWidget;
                if ($widgetVal instanceof WidgetLayout) {
                    $id = $widgetVal->getId();
                    $widgetLayoutSlots[$id] = $clonedWidget;
                }
            }
            $clonedView->setWidgets($newWidgets);

Posted from SensioLabsInsight

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

No branches or pull requests

1 participant