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
Add RouteBuilders #4276
Add RouteBuilders #4276
Conversation
79057e0
to
0954883
Compare
src/Sulu/Bundle/AdminBundle/Admin/Routing/DatagridRouteBuilder.php
Outdated
Show resolved
Hide resolved
fe688eb
to
edf5bb2
Compare
| ); | ||
| } | ||
|
|
||
| return $this->route; |
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.
clone ?
7c0a4fa
to
d8d3fb9
Compare
d8d3fb9
to
6019ec8
Compare
6019ec8
to
a91bd89
Compare
| public function setResourceKey(string $resourceKey): self; | ||
|
|
||
| /** | ||
| * @param array $locales |
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.
add type or remove
UPGRADE.md
Outdated
| to use the `RouteBuilderFactory`. It offers methods to create Form, Datagrid and ResourceTabs routes in a typed way, | ||
| which means auto completion in the IDE should work as well. | ||
|
|
||
| Apart from that the `Route::addOption` was renamed to `Route::setOption`, since it overrides existing option values. |
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.
add addAttributeDefault change
| ->getRoute(), | ||
| $this->routeBuilderFactory->createFormRouteBuilder('sulu_category.add_form.detail', '/details') | ||
| ->setResourceKey('categories') | ||
| ->setFormKey('categories') |
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.
category.details
62bef68
to
eaf68ef
Compare
eaf68ef
to
241581b
Compare
What's in this PR?
This PR adds the
Builderpattern to create routes.Why?
Because it is more comfortable to work with.
To Do
ResourceTabsto first tab, if nothing is selected