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

extendable DataProvider #22

Closed
theofidry opened this issue Apr 3, 2015 · 7 comments
Closed

extendable DataProvider #22

theofidry opened this issue Apr 3, 2015 · 7 comments

Comments

@theofidry
Copy link
Contributor

Would it be possible to make the properties and functions of DataProvider protected instead of private or it has been made so on purpose?

@sroze
Copy link
Contributor

sroze commented Apr 3, 2015

@theofidry Why do you need these properties to be protected and what's your use case of extending the ORM data provider class (because I think that's the answer of the first question :)) ?

@theofidry
Copy link
Contributor Author

For instance I which to add a function public function getItemBySlug($slug) to my DataProvider and for that I need to access to resource and managerRegistry that are currently private. As a consequence I have to declare my own DataProvider and copy/paste all the content of DataProvider of the the bundle to do so.

@dunglas
Copy link
Member

dunglas commented Apr 3, 2015

@sroze custom logic for filtering and ordering for instance.
I would prefer making protected getters than direct access to properties.

@theofidry
Copy link
Contributor Author

@dunglas Any change regarding this point with the upgrade?

@dunglas
Copy link
Member

dunglas commented Apr 30, 2015

Yes. I think this bug is not relevant anymore as you can create custom data providers and custom filters.

@theofidry
Copy link
Contributor Author

Ok, I'm taking care of rebasing the order filter and will check this point later then.

@theofidry
Copy link
Contributor Author

With the change in the way URL queries are handled (cf. PR #43), we do not have the need to extend the DataProvider anymore.

However maybe adding getters for resources and managerRepository would avoid any problem if one which to do so.

soyuka pushed a commit to LoicBoursin/core that referenced this issue Jul 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants