17 public function __serialize() {
21 if ($this->
object instanceof \
ElggData) {
23 $data[
'object_id'] = $this->
object->guid;
25 $data[
'object_id'] = $this->
object->id;
33 $data[
'actor_guid'] = $this->actor->guid;
46 public function __unserialize(
$data) {
47 if (isset(
$data[
'action'])) {
48 $this->action =
$data[
'action'];
51 if (isset(
$data[
'object_id']) && isset(
$data[
'object_type'])) {
52 $object_id =
$data[
'object_id'];
53 switch (
$data[
'object_type']) {
72 if (isset(
$data[
'actor_guid'])) {
getSubtype()
Get the entity subtype.
if(!$entity instanceof\ElggUser) $data
get_entity(int $guid)
Loads and returns an entity object from a guid.
elgg_get_relationship(int $id)
Get a relationship by its ID.
A generic class that contains shared code among , , and .
getType()
Returns the entity type.
elgg_get_annotation_from_id(int $id)
Elgg annotations Functions to manage object annotations.