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
EZP-29849: Allow user to remove location in subtree limitation #273
Conversation
This comment has been minimized.
This comment has been minimized.
return null; | ||
} | ||
|
||
return array_map(function (Location $location) { |
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.
don't know if this even matters, but that could be replaced with array_column.
PR updated according to @ViniTou suggestions. |
This comment has been minimized.
This comment has been minimized.
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.
Small nitpick but overally good 👍
} | ||
|
||
try { | ||
return array_map(function ($id) { |
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.
No need for closure:
return array_map([$this->locationService, 'loadLocation'], explode(self::DELIMITER, $value));
PR updated according to @webhdx suggestions. |
Description
Changes required to make Location object available during rendering edit form of the location based limitations.
In the limitation template (e.g.
src/bundle/Resources/views/Limitation/udw_limitation_value.html.twig
inezplatform-admin-ui
) location instances are available usingform.limitationValues.vars.data
. The model/view format of data is not changed: