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
Single location for entity type list definition (Trac #4272) #4272
Comments
trac user mrclay wrote on 42016865-06-01 I've recoded my plugin as an ElggObject so I've personally no immediate need for this. Further I don't think it's wise to enable this by plugin devs (e.g. would we have to give devs the ability to alter the entities.type ENUM?); using objects is probably a "good enough" way to model future potential entities. |
cash wrote on 42016887-08-30 I left a comment on http://community.elgg.org/pg/forum/topic/830706/entity-list-spec/ Independent of your work, it makes sense to put all the entity types in a central place. |
Milestone changed to |
Title changed from |
Milestone changed to |
Original ticket http://trac.elgg.org/ticket/4272 on 42014813-06-23 by trac user mrclay, assigned to unknown.
Elgg version: 1.8.2
Currently the mapping of entity types to classnames is hardcoded:
https://github.com/Elgg/Elgg/blob/1.8/engine/lib/entities.php#L631
https://github.com/Elgg/Elgg/blob/1.8/engine/lib/entities.php#L964
https://github.com/Elgg/Elgg/blob/1.8/engine/lib/entities.php#L1552
(and probably more)
While entity types are rarely added (and shouldn't generally be by plugins), I need it for my plugin :)
https://github.com/mrclay/Elgg-xcollection
I had to fork get_entity(as_row) and delete_entity to workaround this, but I'd have to fork a lot more to support metadata, etc.
In the short run I may have to rewrite this as an ElggObject, though this would add more work porting it back into core later.
The text was updated successfully, but these errors were encountered: