Elgg
Version 6.2
|
Public Member Functions | ||||
__construct (?\stdClass $row=null) | ||||
Create a relationship object. More... | ||||
__set (string $name, mixed $value) | ||||
Set an attribute of the relationship. More... | ||||
__get (string $name) | ||||
Get an attribute of the relationship. More... | ||||
save () | ||||
{Save this data to the appropriate database table.
| ||||
delete () | ||||
Delete this relationship from the database. More... | ||||
getURL () | ||||
Get a URL for this relationship. More... | ||||
toObject (array $params=[]) | ||||
{Get a plain old object copy for public consumption.
| ||||
getSystemLogID () | ||||
{Return an identification for the object for storage in the system log.This id must be an integer. Unsaved implementations should return 0.
| ||||
getObjectFromID (int $id) | ||||
For a given ID, return the object associated with it. More... | ||||
getType () | ||||
Return a type of the object - eg. More... | ||||
getSubtype () | ||||
Return a subtype. More... | ||||
getOriginalAttributes () | ||||
Get the original values of attribute(s) that have been modified since the relationship was persisted. More... | ||||
![]() | ||||
__isset ($name) | ||||
Test if property is set either as an attribute or metadata. More... | ||||
__unset ($name) | ||||
Unset a property from metadata or attribute. More... | ||||
getTimeCreated () | ||||
Returns the UNIX epoch time that this entity was created. More... | ||||
rewind () | ||||
Iterator interface. More... | ||||
current () | ||||
Iterator interface. More... | ||||
key () | ||||
Iterator interface. More... | ||||
next () | ||||
Iterator interface. More... | ||||
valid () | ||||
Iterator interface. More... | ||||
offsetSet ($offset, $value) | ||||
Array access interface. More... | ||||
offsetGet ($offset) | ||||
Array access interface. More... | ||||
offsetUnset ($offset) | ||||
Array access interface. More... | ||||
offsetExists ($offset) | ||||
Array access interface. More... | ||||
getID () | ||||
{Get unique item identifier within a collection.
| ||||
getPriority () | ||||
{Get priority (weight) of the item within a collection.
| ||||
__serialize () | ||||
Called during serialization. More... | ||||
__unserialize (array $data) | ||||
Called during unserialization. More... | ||||
Public Attributes | |
const | PRIMARY_ATTR_NAMES |
Protected Member Functions | |
initializeAttributes () | |
{Initialize the attributes array.This is vital to distinguish between metadata and base parameters.
| |
![]() | |
getDatabase () | |
Provides a pointer to the database object. More... | |
Protected Attributes | |
const | INTEGER_ATTR_NAMES |
array | $orig_attributes = [] |
![]() | |
$attributes = [] | |
$valid = false | |
Definition at line 12 of file ElggRelationship.php.
ElggRelationship::__construct | ( | ?\stdClass | $row = null | ) |
Create a relationship object.
null | \stdClass | $row | Database row |
Definition at line 46 of file ElggRelationship.php.
ElggRelationship::__get | ( | string | $name | ) |
Get an attribute of the relationship.
string | $name | Name |
Definition at line 121 of file ElggRelationship.php.
ElggRelationship::__set | ( | string | $name, |
mixed | $value | ||
) |
Set an attribute of the relationship.
string | $name | Name |
mixed | $value | Value |
Definition at line 85 of file ElggRelationship.php.
ElggRelationship::delete | ( | ) |
Delete this relationship from the database.
Reimplemented from ElggData.
Definition at line 158 of file ElggRelationship.php.
ElggRelationship::getObjectFromID | ( | int | $id | ) |
For a given ID, return the object associated with it.
This is used by the river functionality primarily. This is useful for checking access permissions etc on objects.
int | $id | ID |
Reimplemented from ElggData.
Definition at line 210 of file ElggRelationship.php.
ElggRelationship::getOriginalAttributes | ( | ) |
Get the original values of attribute(s) that have been modified since the relationship was persisted.
Definition at line 238 of file ElggRelationship.php.
ElggRelationship::getSubtype | ( | ) |
Return a subtype.
For metadata & annotations this is the 'name' and for relationship this is the relationship type.
Reimplemented from ElggData.
Definition at line 229 of file ElggRelationship.php.
ElggRelationship::getSystemLogID | ( | ) |
{Return an identification for the object for storage in the system log.This id must be an integer. Unsaved implementations should return 0.
Reimplemented from ElggData.
Definition at line 197 of file ElggRelationship.php.
ElggRelationship::getType | ( | ) |
Return a type of the object - eg.
object, group, user, relationship, metadata, annotation etc
Reimplemented from ElggData.
Definition at line 219 of file ElggRelationship.php.
ElggRelationship::getURL | ( | ) |
Get a URL for this relationship.
Plugins can register for the 'relationship:url', 'relationship' event to customize the url for a relationship.
Reimplemented from ElggData.
Definition at line 170 of file ElggRelationship.php.
|
protected |
{Initialize the attributes array.This is vital to distinguish between metadata and base parameters.
Reimplemented from ElggData.
Definition at line 68 of file ElggRelationship.php.
ElggRelationship::save | ( | ) |
{Save this data to the appropriate database table.
Reimplemented from ElggData.
Definition at line 132 of file ElggRelationship.php.
ElggRelationship::toObject | ( | array | $params = [] | ) |
{Get a plain old object copy for public consumption.
array | $params | Export parameters |
Reimplemented from ElggData.
Definition at line 179 of file ElggRelationship.php.
|
protected |
Definition at line 39 of file ElggRelationship.php.
|
protected |
Definition at line 28 of file ElggRelationship.php.
const ElggRelationship::PRIMARY_ATTR_NAMES |
Definition at line 17 of file ElggRelationship.php.