103         parent::initializeAttributes();
 
  105         $this->attributes[
'guid'] = 
null;
 
  106         $this->attributes[
'type'] = 
null;
 
  107         $this->attributes[
'subtype'] = 
null;
 
  109         $this->attributes[
'owner_guid'] = 
_elgg_services()->session->getLoggedInUserGuid();
 
  110         $this->attributes[
'container_guid'] = 
_elgg_services()->session->getLoggedInUserGuid();
 
  112         $this->attributes[
'site_guid'] = 
null;
 
  114         $this->attributes[
'time_updated'] = 
null;
 
  115         $this->attributes[
'last_action'] = 
null;
 
  116         $this->attributes[
'enabled'] = 
"yes";
 
  133         $this->tables_split = 1;
 
  134         $this->tables_loaded = 0;
 
  153             _elgg_services()->logger->error(
"Failed to clone entity with GUID $this->guid");
 
  158             'guid' => $this->guid,
 
  162         $this->attributes[
'guid'] = 
"";
 
  164         $this->attributes[
'subtype'] = $orig_entity->getSubtype();
 
  168         if (is_array($metadata_array)) {
 
  170             $metadata_names = array();
 
  175             $metadata_names = array_unique($metadata_names);
 
  178             foreach ($metadata_names as 
$name) {
 
  179                 $this->
__set($name, $orig_entity->$name);
 
  198         if (array_key_exists(
$name, $this->attributes)) {
 
  208                 case 'container_guid':
 
  212                         $this->attributes[
$name] = 
null;
 
  253         if (array_key_exists(
$name, $this->attributes)) {
 
  254             if (
$name === 
'subtype' && $this->attributes[
'guid']) {
 
  258             return $this->attributes[
$name];
 
  302             if (isset($this->temp_metadata[
$name])) {
 
  304                 if (count($this->temp_metadata[
$name]) == 1) {
 
  305                     return $this->temp_metadata[
$name][0];
 
  307                     return $this->temp_metadata[
$name];
 
  317         if ($cache->isLoaded(
$guid)) {
 
  320             $cache->populateFromEntities(array(
$guid));
 
  322             if ($cache->isLoaded(
$guid)) {
 
  329             'metadata_name' => 
$name,
 
  336         if ($md && !is_array($md)) {
 
  338         } elseif (count($md) == 1) {
 
  340         } 
else if ($md && is_array($md)) {
 
  358         if (array_key_exists(
$name, $this->attributes)) {
 
  359             $this->attributes[
$name] = 
"";
 
  401                     'metadata_name' => 
$name,
 
  417             $access_id = ($access_id === 
null) ? $this->getAccessId() : (int)$access_id;
 
  422             foreach (
$value as $value_tmp) {
 
  439                 $msg = 
"owner guid and access id cannot be used in \ElggEntity::setMetadata() until entity is saved.";
 
  440                 throw new \InvalidArgumentException($msg);
 
  444             if (!$multiple || !isset($this->temp_metadata[
$name])) {
 
  445                 $this->temp_metadata[
$name] = array();
 
  449             $this->temp_metadata[
$name] = array_merge($this->temp_metadata[
$name], 
$value);
 
  471             'guid' => $this->guid,
 
  494             'metadata_owner_guid' => $this->guid,
 
  529             'guid' => $this->guid,
 
  550             'guid' => $this->guid,
 
  568         if (!is_array($this->
volatile)) {
 
  569             $this->
volatile = array();
 
  572         if (array_key_exists(
$name, $this->
volatile)) {
 
  573             return $this->
volatile[
$name];
 
  588         if (!is_array($this->
volatile)) {
 
  589             $this->
volatile = array();
 
  609         $relationship = (string)$relationship;
 
  623         elgg_deprecated_notice(
'\ElggEntity->clearRelationships() is deprecated by ->deleteRelationships()', 1.8);
 
  669         if ((
int) $this->guid > 0) {
 
  685         if ((
int) ($this->guid) > 0) {
 
  688             if (isset($this->temp_private_settings[
$name])) {
 
  689                 return $this->temp_private_settings[
$name];
 
  718             'guid' => $this->guid,
 
  741             'annotation_owner_guid' => $this->guid,
 
  762             'guid' => $this->guid,
 
  783             'guid' => $this->guid,
 
  800     private function getAnnotationCalculation(
$name, $calculation) {
 
  804             'annotation_name' => 
$name,
 
  805             'annotation_calculation' => $calculation
 
  828         if ((
int) $this->guid > 0) {
 
  856         if ((
int) ($this->guid) > 0) {
 
  859                     'guid' => $this->guid,
 
  865                 if ($order != 
'asc') {
 
  866                     $options[
'reverse_order_by'] = 
true;
 
  880             if (isset($this->temp_annotations[
$name])) {
 
  881                 return array($this->temp_annotations[
$name]);
 
  911         return $this->getAnnotationCalculation(
$name, 
'count');
 
  922         return $this->getAnnotationCalculation(
$name, 
'avg');
 
  933         return $this->getAnnotationCalculation(
$name, 
'sum');
 
  944         return $this->getAnnotationCalculation(
$name, 
'min');
 
  955         return $this->getAnnotationCalculation(
$name, 
'max');
 
  965         $params = array(
'entity' => $this);
 
  973                 'subtype' => 
'comment',
 
  974                 'container_guid' => $this->
getGUID(),
 
 1002                 'relationship_guid' => $this->
getGUID(),
 
 1003                 'inverse_relationship' => $inverse,
 
 1020             'relationship' => $relationship,
 
 1021             'relationship_guid' => $this->
getGUID(),
 
 1022             'inverse_relationship' => $inverse_relationship,
 
 1222             'annotation_name' => $annotation_name,
 
 1233         return $this->access_id;
 
 1261         if ($this->attributes[
'guid']) {
 
 1264         return $this->attributes[
'subtype'];
 
 1356         return $this->time_updated;
 
 1374             if (isset(
$CONFIG->entity_url_handler[$this->getType()][$this->getSubtype()])) {
 
 1376                 if (is_callable($function)) {
 
 1377                     $url = call_user_func($function, $this);
 
 1379             } elseif (isset(
$CONFIG->entity_url_handler[$this->getType()][
'all'])) {
 
 1380                 $function = 
$CONFIG->entity_url_handler[$this->
getType()][
'all'];
 
 1381                 if (is_callable($function)) {
 
 1382                     $url = call_user_func($function, $this);
 
 1384             } elseif (isset(
$CONFIG->entity_url_handler[
'all'][
'all'])) {
 
 1385                 $function = 
$CONFIG->entity_url_handler[
'all'][
'all'];
 
 1386                 if (is_callable($function)) {
 
 1387                     $url = call_user_func($function, $this);
 
 1397         $params = array(
'entity' => $this);
 
 1401         if (!empty($this->url_override)) {
 
 1420         $this->url_override = 
$url;
 
 1444         if (isset($this->icon_override[
$size])) {
 
 1446             return $this->icon_override[
$size];
 
 1456             $url = 
"_graphics/icons/default/$size.png";
 
 1492         if (!$this->icon_override) {
 
 1493             $this->icon_override = array();
 
 1516         return $site->addEntity($this);
 
 1534         return $site->removeEntity($this);
 
 1550         $options[
'relationship'] = 
'member_of_site';
 
 1552         $options[
'inverse_relationship'] = 
false;
 
 1616             throw new \InvalidParameterException(
"Entity type must be set.");
 
 1619         $subtype = $this->attributes[
'subtype'];
 
 1621         $owner_guid = (int)$this->attributes[
'owner_guid'];
 
 1622         $access_id = (int)$this->attributes[
'access_id'];
 
 1623         $now = (string)time();
 
 1624         $time_created = isset($this->attributes[
'time_created']) ? (int)$this->attributes[
'time_created'] : $now;
 
 1626         $site_guid = $this->attributes[
'site_guid'];
 
 1627         if ($site_guid == 0) {
 
 1628             $site_guid = 
$CONFIG->site_guid;
 
 1630         $site_guid = (int)$site_guid;
 
 1639             throw new \InvalidParameterException(
'ACCESS_DEFAULT is not a valid access level. See its documentation in elgglib.h');
 
 1655             (type, subtype, owner_guid, site_guid, container_guid, 
 1656                 access_id, time_created, time_updated, last_action) 
 1658             ('$type', $subtype_id, $owner_guid, $site_guid, $container_guid, 
 1659                 $access_id, $time_created, $now, $now)");
 
 1662             throw new \IOException(
"Unable to save new object's base entity information!");
 
 1666         $this->attributes[
'subtype'] = (int)$subtype_id;
 
 1667         $this->attributes[
'guid'] = (int)
$result;
 
 1669         $this->attributes[
'time_updated'] = (int)$now;
 
 1670         $this->attributes[
'last_action'] = (int)$now;
 
 1671         $this->attributes[
'site_guid'] = (int)$site_guid;
 
 1675         if (
sizeof($this->temp_metadata) > 0) {
 
 1676             foreach ($this->temp_metadata as 
$name => 
$value) {
 
 1680             $this->temp_metadata = array();
 
 1684         if (
sizeof($this->temp_annotations) > 0) {
 
 1685             foreach ($this->temp_annotations as 
$name => 
$value) {
 
 1689             $this->temp_annotations = array();
 
 1693         if (
sizeof($this->temp_private_settings) > 0) {
 
 1694             foreach ($this->temp_private_settings as 
$name => 
$value) {
 
 1698             $this->temp_private_settings = array();
 
 1720         if (!$persisted_entity) {
 
 1726         $allow_edit = $persisted_entity->canEdit();
 
 1727         unset($persisted_entity);
 
 1741         $guid = (int)$this->guid;
 
 1749             throw new \InvalidParameterException(
'ACCESS_DEFAULT is not a valid access level. See its documentation in elgglib.php');
 
 1752         $ret = $this->
getDatabase()->updateData(
"UPDATE {$CONFIG->dbprefix}entities 
 1753             set owner_guid='$owner_guid', access_id='$access_id', 
 1754             container_guid='$container_guid', time_created='$time_created', 
 1755             time_updated='$time' WHERE guid=$guid");
 
 1765         static $newentity_cache;
 
 1767             $newentity_cache = new \ElggMemcache(
'new_entity_cache');
 
 1769         if ($newentity_cache) {
 
 1770             $newentity_cache->delete(
$guid);
 
 1773         if ($ret !== 
false) {
 
 1774             $this->attributes[
'time_updated'] = $time;
 
 1780         return $ret !== 
false;
 
 1791         if (
$guid instanceof \stdClass) {
 
 1799             if (!is_array($this->attributes)) {
 
 1800                 $this->attributes = array();
 
 1804             $objarray = (array) 
$row;
 
 1811                 $this->tables_loaded++;
 
 1815             $this->attributes[
'guid'] = (int)$this->attributes[
'guid'];
 
 1818             $this->attributes[
'subtype'] = (int)$this->attributes[
'subtype'];
 
 1821             if ($this->attributes[
'guid']) {
 
 1856         if (
$row instanceof \stdClass) {
 
 1857             return $this->
load($row);
 
 1881     public function disable($reason = 
"", $recursive = 
true) {
 
 1897             $this->disable_reason = $reason;
 
 1901         $guid = (int)$this->guid;
 
 1908             $sub_entities = $this->
getDatabase()->getData(
"SELECT * FROM {$CONFIG->dbprefix}entities 
 1910                 container_guid = $guid 
 1911                 OR owner_guid = $guid 
 1912                 OR site_guid = $guid 
 1913                 ) AND enabled='yes'", 
'entity_row_to_elggstar');
 
 1915             if ($sub_entities) {
 
 1916                 foreach ($sub_entities as 
$e) {
 
 1918                     $e->disable($reason);
 
 1929         $res = $this->
getDatabase()->updateData(
"UPDATE {$CONFIG->dbprefix}entities 
 1931             WHERE guid = $guid");
 
 1934             $this->attributes[
'enabled'] = 
'no';
 
 1952         $guid = (int)$this->guid;
 
 1973             WHERE guid = $guid");
 
 1981                 'relationship' => 
'disabled_with',
 
 1982                 'relationship_guid' => 
$guid,
 
 1983                 'inverse_relationship' => 
true,
 
 1987             foreach ($disabled_with_it as 
$e) {
 
 1996             $this->attributes[
'enabled'] = 
'yes';
 
 2009         return $this->enabled == 
'yes';
 
 2029     public function delete($recursive = 
true) {
 
 2053         static $newentity_cache;
 
 2055             $newentity_cache = new \ElggMemcache(
'new_entity_cache');
 
 2057         if ($newentity_cache) {
 
 2058             $newentity_cache->delete(
$guid);
 
 2073                     "((container_guid = $guid OR owner_guid = $guid OR site_guid = $guid)" 
 2074                     . 
" AND guid != $guid)" 
 2079             $batch = new \ElggBatch(
'elgg_get_entities', 
$options);
 
 2080             $batch->setIncrementOffset(
false);
 
 2082             foreach ($batch as 
$e) {
 
 2111         $res = $this->
getDatabase()->deleteData(
"DELETE FROM {$CONFIG->dbprefix}entities WHERE guid = $guid");
 
 2116             switch ($this->
type) {
 
 2118                     $sub_table = 
$CONFIG->dbprefix . 
'objects_entity';
 
 2121                     $sub_table = 
$CONFIG->dbprefix . 
'users_entity';
 
 2124                     $sub_table = 
$CONFIG->dbprefix . 
'groups_entity';
 
 2127                     $sub_table = 
$CONFIG->dbprefix . 
'sites_entity';
 
 2132                 $this->
getDatabase()->deleteData(
"DELETE FROM $sub_table WHERE guid = $guid");
 
 2146         $params = array(
'entity' => $this);
 
 2181         return $this->location;
 
 2192         $this->location = $location;
 
 2205         $this->{
"geo:lat"} = $lat;
 
 2206         $this->{
"geo:long"} = $long;
 
 2216         return (
float)$this->{
"geo:lat"};
 
 2226         return (
float)$this->{
"geo:long"};
 
 2248     $day = 
null, $month = 
null, $year = 
null, $duration = 
null) {
 
 2251         $start = mktime($hour, $minute, $second, $month, $day, $year);
 
 2252         $end = $start + abs($duration);
 
 2257         $this->calendar_start = $start;
 
 2258         $this->calendar_end = $end;
 
 2271         return (
int)$this->calendar_start;
 
 2282         return (
int)$this->calendar_end;
 
 2327             $this->attributes[
'type'],
 
 2336         foreach ($this->attributes as $k => $v) {
 
 2346                     case 'time_created':    
 
 2347                         $odd->setAttribute(
'published', date(
"r", $v));
 
 2353                         $meta = 
new ODDMetaData($uuid . 
"attr/$k/", $uuid, $k, $v);
 
 2356                     case 'container_guid':  
 
 2357                         $k = 
'container_uuid';
 
 2359                         $meta = 
new ODDMetaData($uuid . 
"attr/$k/", $uuid, $k, $v);
 
 2365                         $meta = 
new ODDMetaData($uuid . 
"attr/$k/", $uuid, $k, $v);
 
 2369                         $meta = 
new ODDMetaData($uuid . 
"attr/$k/", $uuid, $k, $v);
 
 2374                     $meta->setAttribute(
'published', date(
"r", $this->time_created));
 
 2389         $tmp[] = 
new ODDMetaData($uuid . 
"volatile/renderedentity/", $uuid,
 
 2390             'renderedentity', 
$view, 
'volatile');
 
 2412             throw new \InvalidParameterException(
"import() passed an unexpected ODD class");
 
 2416         $this->attributes[
'type'] = 
$data->getAttribute(
'class');
 
 2417         $this->attributes[
'subtype'] = 
$data->getAttribute(
'subclass');
 
 2420         $this->attributes[
'owner_guid'] = 
_elgg_services()->session->getLoggedInUserGuid(); 
 
 2423         $this->attributes[
'time_created'] = strtotime(
$data->getAttribute(
'published'));
 
 2424         $this->attributes[
'time_updated'] = time();
 
 2464         if ($tag_names && !is_array($tag_names)) {
 
 2465             $tag_names = array($tag_names);
 
 2469         $entity_tags = array();
 
 2471         foreach ($valid_tags as $tag_name) {
 
 2472             if (is_array($tag_names) && !in_array($tag_name, $tag_names)) {
 
 2476             if (
$tags = $this->$tag_name) {
 
 2479                 if (is_array(
$tags)) {
 
 2480                     $entity_tags = array_merge($entity_tags, 
$tags);
 
 2482                     $entity_tags[] = 
$tags;
 
 2487         return $entity_tags;
 
 2502         if ($this->
type !== 
'user') {
 
 2508         $collections = $ac->getCollectionsByMember($this->guid);
 
 2509         if (empty($collections)) {
 
 2535         $collections = $ac->getEntityCollections($this->guid);
 
 2536         if (empty($collections)) {
 
if(! $collection_name) $id
if($guid==elgg_get_logged_in_user_guid()) $name
elgg_delete_annotations(array $options)
Deletes annotations based on $options.
elgg_enable_annotations(array $options)
Enables annotations based on $options.
elgg_disable_annotations(array $options)
Disables annotations based on $options.
create_annotation($entity_guid, $name, $value, $value_type='', $owner_guid=0, $access_id=ACCESS_PRIVATE)
Create a new annotation.
elgg_get_annotations(array $options=array())
Returns annotations.
$user_guid
Avatar remove action.
getDatabase()
Provides a pointer to the database object.
getTimeCreated()
Returns the UNIX epoch time that this entity was created.
initializeAttributes()
Initialize the attributes array.
setLocation($location)
Sets the 'location' metadata for the entity.
getSites($options=array())
Gets the sites this entity is a member of.
$url_override
If set, overrides the value of getURL()
getType()
Returns the entity type.
deleteRelationships($relationship=null)
Remove all relationships to and from this entity.
__set($name, $value)
Set an attribute or metadata value for this entity.
toObject()
{Get a plain old object copy for public consumption.\stdClass}
countEntitiesFromRelationship($relationship, $inverse_relationship=false)
Gets the number of entities from a specific relationship type.
$volatile
Volatile data structure for this object, allows for storage of data in-memory that isn't sync'd back ...
getSystemLogID()
Return an identification for the object for storage in the system log.
clearAnnotations($name="")
Remove an annotation or all annotations for this entity.
refresh(\stdClass $row)
Load new data from database into existing entity.
getCalendarStartTime()
Returns the start timestamp.
$temp_private_settings
Holds private settings until entity is saved.
$temp_annotations
Holds annotations until entity is saved.
annotate($name, $value, $access_id=ACCESS_PRIVATE, $owner_guid=0, $vartype="")
Adds an annotation to an entity.
setPrivateSetting($name, $value)
Adds a private setting to this entity.
removePrivateSetting($name)
Removes private setting.
getSubtype()
Get the entity subtype.
getIcon($size='medium')
Returns a URL for the entity's icon.
$icon_override
Icon override, overrides the value of getIcon().
getTags($tag_names=null)
Returns tags for this entity.
canEditMetadata($metadata=null, $user_guid=0)
Can a user edit metadata on this entity?
getExportableValues()
Returns an array of fields which can be exported.
enableAnnotations($name='')
Enables annotations for this entity, optionally based on name.
getContainerGUID()
Gets the container GUID for this entity.
__get($name)
Get an attribute or metadata value.
canAnnotate($user_guid=0, $annotation_name='')
Can a user annotate an entity?
$temp_metadata
Holds metadata until entity is saved.
getVolatileData($name)
Get a piece of volatile (non-persisted) data on this entity.
countAnnotations($name="")
Count annotations.
enable($recursive=true)
Enable the entity.
prepareObject($object)
Prepare an object copy for toObject()
setDisplayName($displayName)
Sets the title or name of this entity.
load($guid)
Loads attributes from the entities table into the object.
export()
Export this class into an array of ODD Elements containing all necessary fields.
deleteOwnedAccessCollections()
Remove all access collections owned by this entity.
update()
Update the entity in the database.
getDisplayName()
Get the entity's display name.
getOwnerEntity()
Gets the \ElggEntity that owns this entity.
create()
Create a new entry in the entities table.
addToSite($site)
Add this entity to a site.
addRelationship($guid_two, $relationship)
Add a relationship between this an another entity.
deleteOwnedAnnotations($name=null)
Deletes all annotations owned by this object (annotations.owner_guid = $this->guid).
getContainerEntity()
Get the container entity for this object.
getURL()
Gets the URL for this entity.
deleteAccessCollectionMemberships()
Remove the membership of all access collections for this entity (if the entity is a user)
disable($reason="", $recursive=true)
Disable this entity.
__unset($name)
Unset a property from metadata or attribute.
getLongitude()
Return the entity's longitude.
canEdit($user_guid=0)
Can a user edit this entity?
loadAdditionalSelectValues(array $data)
Stores non-attributes from the loading of the entity as volatile data.
getAnnotationsMax($name)
Get the maximum of integer type annotations of a given name.
deleteMetadata($name=null)
Deletes all metadata on this object (metadata.entity_guid = $this->guid).
getTimeUpdated()
Returns the UNIX epoch time that this entity was last updated.
removeRelationship($guid_two, $relationship)
Remove a relationship.
isEnabled()
Is this entity enabled?
getPrivateSetting($name)
Returns a private setting value.
getLocation()
Gets the 'location' metadata for the entity.
setCalendarTimeAndDuration($hour=null, $minute=null, $second=null, $day=null, $month=null, $year=null, $duration=null)
Set the time and duration of an object.
canWriteToContainer($user_guid=0, $type='all', $subtype='all')
Can a user add an entity to this container.
clearRelationships()
Remove all relationships to and from this entity.
disableMetadata($name='')
Disables metadata for this entity, optionally based on name.
getAnnotations($options=array(), $limit=50, $offset=0, $order="asc")
Gets an array of annotations.
setIcon($url, $size='medium')
Set an icon override for an icon and size.
getAnnotationsSum($name)
Get the sum of integer type annotations of a given name.
getGUID()
Returns the guid.
setURL($url)
Overrides the URL returned by getURL()
getContainer()
Gets the container GUID for this entity.
deleteAnnotations($name=null)
Deletes all annotations on this object (annotations.entity_guid = $this->guid).
getObjectFromID($id)
For a given ID, return the object associated with it.
isFullyLoaded()
Tests to see whether the object has been fully loaded.
disableAnnotations($name='')
Disables annotations for this entity, optionally based on name.
getCalendarEndTime()
Returns the end timestamp.
getAnnotationsMin($name)
Get the minimum of integer type annotations of given name.
setContainerGUID($container_guid)
Set the container for this object.
removeFromSite($site)
Remove this entity from a site.
getAnnotationsAvg($name)
Get the average of an integer type annotation.
enableMetadata($name='')
Enables metadata for this entity, optionally based on name.
setVolatileData($name, $value)
Set a piece of volatile (non-persisted) data on this entity.
__clone()
Clone an entity.
setContainer($container_guid)
Set the container for this object.
getOwner()
Return the guid of the entity's owner.
getOwnerGUID()
Get the guid of the entity's owner.
canDelete($user_guid=0)
Can a user delete this entity?
setMetadata($name, $value, $value_type='', $multiple=false, $owner_guid=0, $access_id=null)
Set metadata on this entity.
getLatitude()
Return the entity's latitude.
countComments()
Count the number of comments attached to this entity.
clearMetadata($name='')
Remove metadata.
getAccessID()
Returns the access_id.
getEntitiesFromRelationship($options=array(), $inverse=false, $limit=50, $offset=0)
Gets an array of entities with a relationship to this entity.
getMetadata($name)
Return the value of a piece of metadata.
deleteOwnedMetadata($name=null)
Deletes all metadata owned by this object (metadata.owner_guid = $this->guid).
getIconURL($params=array())
Get the URL for this entity's icon.
setLatLong($lat, $long)
Set latitude and longitude metadata tags for a given entity.
canComment($user_guid=0)
Can a user comment on an entity?
$CONFIG site_guid
The guid of the current site object.
$guid
Removes an admin notice.
events($event="", $object_type="", $function="", $priority=500, $call=false, $object=null)
Deprecated events core function.
get_day_end($day=null, $month=null, $year=null)
Return a timestamp for the end of a given day (defaults today).
guid_to_uuid($guid)
Generate a UUID from a given GUID.
const ELGG_ENTITIES_ANY_VALUE
elgg_extract($key, array $array, $default=null, $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
elgg_trigger_after_event($event, $object_type, $object=null)
Trigger an "After event" indicating a process has finished.
elgg_deprecated_notice($msg, $dep_version, $backtrace_level=1)
Log a notice about deprecated use of a function, view, etc.
access_get_show_hidden_status()
Return current status of showing disabled entities.
access_show_hidden_entities($show_hidden)
Show or hide disabled entities.
elgg_set_ignore_access($ignore=true)
Set if Elgg's access system should be ignored.
sanitise_string($string)
Wrapper function for alternate English spelling (.
update_river_access_by_object($object_guid, $access_id)
Sets the access ID on river items for a particular object.
elgg_delete_river(array $options=array())
Delete river items.
elgg_instanceof($entity, $type=null, $subtype=null, $class=null)
Checks if $entity is an \ElggEntity and optionally for type and subtype.
_elgg_cache_entity(\ElggEntity $entity)
Cache an entity.
_elgg_disable_caching_for_entity($guid)
Remove this entity from the entity cache and make sure it is not re-added.
get_entity($guid)
Loads and returns an entity object from a guid.
_elgg_invalidate_cache_for_entity($guid)
Invalidate this class's entry in the cache.
_elgg_enable_caching_for_entity($guid)
Allow this entity to be stored in the entity cache.
get_subtype_from_id($subtype_id)
Gets the denormalized string for a given subtype ID.
get_entity_as_row($guid)
Returns a database row from the entities table.
can_write_to_container($user_guid=0, $container_guid=0, $type='all', $subtype='all')
Determine if a given user can write to an entity container.
add_subtype($type, $subtype, $class="")
Register \ElggEntities with a certain type and subtype to be loaded as a specific class.
elgg_get_entities(array $options=array())
Returns an array of entities with optional filtering.
_elgg_clear_entity_files($entity)
Removes all entity files.
elgg_strtolower()
Wrapper function for mb_strtolower().
is_memcache_available()
Return true if memcache is available and configured.
remove_private_setting($entity_guid, $name)
Deletes a private setting for an entity.
remove_all_private_settings($entity_guid)
Deletes all private settings for an entity.
get_private_setting($entity_guid, $name)
Gets a private setting for an entity.
set_private_setting($entity_guid, $name, $value)
Sets a private setting for an entity.
remove_entity_relationships($guid, $relationship="", $inverse_relationship=false, $type='')
Removes all relationships originating from a particular entity.
elgg_get_entities_from_relationship($options)
Return entities matching a given query joining against a relationship.
add_entity_relationship($guid_one, $relationship, $guid_two)
Create a relationship between two entities.
remove_entity_relationship($guid_one, $relationship, $guid_two)
Delete a relationship between two entities.
get_user($guid)
Get a user object from a GUID.
elgg_view_entity(\ElggEntity $entity, $vars=array(), $bypass=false, $debug=false)
Returns a string of a rendered entity.
elgg_set_viewtype($viewtype="")
Manually set the viewtype.