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

EZP-29849: Allow user to remove location in subtree limitation #273

Merged
merged 5 commits into from Jan 28, 2019

Conversation

adamwojs
Copy link
Member

JIRA: https://jira.ez.no/browse/EZP-29849

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 in ezplatform-admin-ui) location instances are available using form.limitationValues.vars.data. The model/view format of data is not changed:

zrzut ekranu z 2019-01-14 20-32-00

@ezrobot

This comment has been minimized.

return null;
}

return array_map(function (Location $location) {
Copy link
Contributor

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.

@adamwojs
Copy link
Member Author

PR updated according to @ViniTou suggestions.

@ezrobot

This comment has been minimized.

Copy link
Contributor

@webhdx webhdx left a 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) {
Copy link
Contributor

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));

@adamwojs
Copy link
Member Author

PR updated according to @webhdx suggestions.

@lserwatka lserwatka merged commit db8810d into ezsystems:master Jan 28, 2019
@adamwojs adamwojs deleted the ezp_29849 branch January 28, 2019 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
7 participants