In Elgg, everything runs on a unified data model, based on atomic units of data called entities. Plugins are strongly discouraged from dealing with database issues themselves, which makes for a more stable system that also has visible benefits for the end user. Content created by different plugins can be mixed together in consistent ways, which are programmed using generic principles - in other words, plugins are faster to develop, and are at the same time much more powerful.
![]()
Every entity in the system inherits the ElggEntity class. This controls access permissions, ownership and so on; Elgg allows you to run multiple sites on the same install, so it also stores the site each element belongs to.
ElggEntity has four main specializations, which provide extra properties and methods to more easily handle different kinds of data.
The benefit of such an approach is that, apart from modelling data with greater ease, a common set of functions is available to handle objects, regardless of their (sub)type.
Each of these have their own properties that they bring to the table: ElggObjects have a title and description, ElggUsers have a username and password, and so on. However, because they all inherit ElggEntity, they each have a number of core properties and behaviours in common.
You can extend entities with extra information in two ways:
data model, metadata, annotations, elggentity, elggentities, elggobject, elgguser, elggsite, elgggroup
Last updated 531 days ago by Dave
