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

Enhance route generation #156

Merged
merged 3 commits into from
Jun 5, 2020

Conversation

luca-rath
Copy link
Contributor

No description provided.

@luca-rath luca-rath requested a review from niklasnatter June 5, 2020 07:08
$routePath = $this->routeGenerator->generate(
$localizedObject,
$routeGenerationData,
Copy link
Contributor

@niklasnatter niklasnatter Jun 5, 2020

Choose a reason for hiding this comment

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

i think passing something like this here would be more pragmatic and flexible:

array_merge(
    $data,
    ['_unlocalizedDimensionContent' => $unlocalizedObject, '_localizedDimensionContent' => $localizedObject]
)

this way the route_schema can still access all template properties (and also the seo properties if he really wants to 😅 ). if somebody needs to access a property that is not available in the $data (which should be a edge case), he probably also knows if he needs to access the _unlocalizedDimensionContent or the _localizedDimensionContent.

@niklasnatter niklasnatter merged commit aa13ae0 into sulu:master Jun 5, 2020
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.

2 participants