Hello,
I am wondering how the recursive deletion works within Elgg and if there is perhaps any documentation for this. By recursive deletion I mean how deleting an entity deletes entities that are linked to it. I am looking for an explanation of the code/where that functionality is located in the class structure. Thanks!
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.
- Nikolai Shcherbin@rivervanrain
Nikolai Shcherbin - 1 like
- Jerome Bakker@jeabakker
Jerome Bakker - 0 likes
You must log in to post replies.From docs:
"If deleting recursively, this bypasses ownership of items contained by the entity.
That means that if the container_guid = $this->guid, the item will be deleted regardless of who owns it."
Look at this.
An example of how to do this in your class.
If you want to look at the code
https://github.com/Elgg/Elgg/blob/b7b6827e6aa3374670414bb9838d4d39e9a9fd4a/engine/classes/Elgg/Database/EntityTable.php#L561-L563
and
https://github.com/Elgg/Elgg/blob/b7b6827e6aa3374670414bb9838d4d39e9a9fd4a/engine/classes/Elgg/Database/EntityTable.php#L584