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

Hidden attributes #3

Closed
thasmo opened this issue Feb 21, 2015 · 5 comments
Closed

Hidden attributes #3

thasmo opened this issue Feb 21, 2015 · 5 comments

Comments

@thasmo
Copy link

thasmo commented Feb 21, 2015

Would be nice to hide attributes (similar to what Eloquent does) by setting a $hidden attribute on the EntityMap, which prevents certain methods to provide those hidden attributes.

@RemiCollin
Copy link
Member

I agree this is a very uselful feature, but as these methods are on the entity itself (toArray(), toJson, etc...), wouldn't it make more sense for the hidden attribute to be defined on the Entity class, than on the EntityMap ?

@thasmo
Copy link
Author

thasmo commented Feb 23, 2015

@RemiCollin, not sure. I thought that maybe the EntityMap is responsible for configuring the Entity and the Entity itself is just a simple shell for the data, just like all relationships are also defined on the EntityMap and not the Entity itself.

@thasmo
Copy link
Author

thasmo commented Feb 24, 2015

Also because the EntityMap class already has a hidden attribute and a getHiddenAttributes getter. Are they unused for now?

@RemiCollin
Copy link
Member

Yes it's a remain of a previous iteration, it's not implemented.

Will have a look to see how it can be achieved.

@RemiCollin
Copy link
Member

Supported in Version 2.1 : Base Entity class now supports hidden attributes

RemiCollin pushed a commit that referenced this issue Jan 19, 2016
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

No branches or pull requests

2 participants