Hi all,
I want to create new entity type in Elgg to model my new class heirerchy.
Is there anyway in which I can define new entity type, while still being able to use ability of Elgg to load various classes using Entity subtype information?
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- TrungHuynh@trunghuynh
TrungHuynh - 0 likes
- itsGaurab@itsGaurab
itsGaurab - 0 likes
- Steve Clay@steve_clay
Steve Clay - 0 likes
- itsGaurab@itsGaurab
itsGaurab - 0 likes
- Steve Clay@steve_clay
Steve Clay - 0 likes
You must log in to post replies.From what i know that you can define new class by extending ElggObject class. After that you can retrieve all of objects base your subtype
I have more then one heirerchy to model in my system. I was planning to create one entityType per heirerchy with subtype to represent the classes of that heirerchy.
This way I would be able to either retrieve complete heirerchy or a particular class as per my requirement.
New entity types are not possible in Elgg core right now. In general I suggest not creating lots of entity subtypes, but rather use ElggObjects as a storage object that gets injected into your domain objects. If that makes any sense.
What would happen in case I extend ElggObject and override value of 'type' field to something related to my class and later use it search my heirerchies?
Will changing type fields value will cause any issues??
You will not be able to change type/subtype once the object is saved.