Public Member Functions | |
| __clone () | |
| Clone an entity. | |
| get ($name) | |
| Return the value of a property. | |
| set ($name, $value) | |
| Sets the value of a property. | |
| getMetaData ($name) | |
| Return the value of a piece of metadata. | |
| __unset ($name) | |
| Unset a property from metadata or attribute. | |
| setMetaData ($name, $value, $value_type=null, $multiple=false) | |
| Set a piece of metadata. | |
| deleteMetadata ($name=null) | |
| Deletes all metadata on this object (metadata.entity_guid = $this->guid). | |
| deleteOwnedMetadata ($name=null) | |
| Deletes all metadata owned by this object (metadata.owner_guid = $this->guid). | |
| clearMetaData ($name= '') | |
| Remove metadata. | |
| disableMetadata ($name= '') | |
| Disables metadata for this entity, optionally based on name. | |
| enableMetadata ($name= '') | |
| Enables metadata for this entity, optionally based on name. | |
| getVolatileData ($name) | |
| Get a piece of volatile (non-persisted) data on this entity. | |
| setVolatileData ($name, $value) | |
| Set a piece of volatile (non-persisted) data on this entity. | |
| deleteRelationships () | |
| Remove all relationships to and from this entity. | |
| clearRelationships () | |
| Remove all relationships to and from this entity. | |
| addRelationship ($guid, $relationship) | |
| Add a relationship between this an another entity. | |
| removeRelationship ($guid, $relationship) | |
| Remove a relationship. | |
| setPrivateSetting ($name, $value) | |
| Adds a private setting to this entity. | |
| getPrivateSetting ($name) | |
| Returns a private setting value. | |
| removePrivateSetting ($name) | |
| Removes private setting. | |
| deleteAnnotations ($name=null) | |
| Deletes all annotations on this object (annotations.entity_guid = $this->guid). | |
| deleteOwnedAnnotations ($name=null) | |
| Deletes all annotations owned by this object (annotations.owner_guid = $this->guid). | |
| disableAnnotations ($name= '') | |
| Disables annotations for this entity, optionally based on name. | |
| enableAnnotations ($name= '') | |
| Enables annotations for this entity, optionally based on name. | |
| annotate ($name, $value, $access_id=ACCESS_PRIVATE, $owner_id=0, $vartype="") | |
| Adds an annotation to an entity. | |
| getAnnotations ($name, $limit=50, $offset=0, $order="asc") | |
| Returns an array of annotations. | |
| clearAnnotations ($name="") | |
| Remove an annotation or all annotations for this entity. | |
| countAnnotations ($name="") | |
| Count annotations. | |
| getAnnotationsAvg ($name) | |
| Get the average of an integer type annotation. | |
| getAnnotationsSum ($name) | |
| Get the sum of integer type annotations of a given name. | |
| getAnnotationsMin ($name) | |
| Get the minimum of integer type annotations of given name. | |
| getAnnotationsMax ($name) | |
| Get the maximum of integer type annotations of a given name. | |
| countComments () | |
| Count the number of comments attached to this entity. | |
| getEntitiesFromRelationship ($relationship, $inverse=false, $limit=50, $offset=0) | |
| Gets an array of entities with a relationship to this entity. | |
| countEntitiesFromRelationship ($relationship, $inverse_relationship=FALSE) | |
| Gets the number of of entities from a specific relationship type. | |
| canEdit ($user_guid=0) | |
| Can a user edit this entity. | |
| canEditMetadata ($metadata=null, $user_guid=0) | |
| Can a user edit metadata on this entity. | |
| canWriteToContainer ($user_guid=0, $type= 'all', $subtype= 'all') | |
| Can a user add an entity to this container. | |
| canComment ($user_guid=0) | |
| Can a user comment on an entity? | |
| canAnnotate ($user_guid=0, $annotation_name= '') | |
| Can a user annotate an entity? | |
| getAccessID () | |
| Returns the access_id. | |
| getGUID () | |
| Returns the guid. | |
| getType () | |
| Returns the entity type. | |
| getSubtype () | |
| Returns the entity subtype string. | |
| getOwnerGUID () | |
| Get the guid of the entity's owner. | |
| getOwner () | |
| Return the guid of the entity's owner. | |
| getOwnerEntity () | |
| Gets the ElggEntity that owns this entity. | |
| setContainerGUID ($container_guid) | |
| Set the container for this object. | |
| setContainer ($container_guid) | |
| Set the container for this object. | |
| getContainerGUID () | |
| Gets the container GUID for this entity. | |
| getContainer () | |
| Gets the container GUID for this entity. | |
| getContainerEntity () | |
| Get the container entity for this object. | |
| getTimeUpdated () | |
| Returns the UNIX epoch time that this entity was last updated. | |
| getURL () | |
| Returns the URL for this entity. | |
| setURL ($url) | |
| Overrides the URL returned by getURL(). | |
| getIconURL ($size= 'medium') | |
| Get the URL for this entity's icon. | |
| getIcon ($size= 'medium') | |
| Returns a URL for the entity's icon. | |
| setIcon ($url, $size= 'medium') | |
| Set an icon override for an icon and size. | |
| isFullyLoaded () | |
| Tests to see whether the object has been fully loaded. | |
| save () | |
| Save an entity. | |
| disable ($reason="", $recursive=true) | |
| Disable this entity. | |
| enable () | |
| Enable an entity. | |
| isEnabled () | |
| Is this entity enabled? | |
| delete ($recursive=true) | |
| Delete this entity. | |
| getLocation () | |
| Gets the 'location' metadata for the entity. | |
| setLocation ($location) | |
| Sets the 'location' metadata for the entity. | |
| setLatLong ($lat, $long) | |
| Set latitude and longitude metadata tags for a given entity. | |
| getLatitude () | |
| Return the entity's latitude. | |
| getLongitude () | |
| Return the entity's longitude. | |
| setCalendarTimeAndDuration ($hour=NULL, $minute=NULL, $second=NULL, $day=NULL, $month=NULL, $year=NULL, $duration=NULL) | |
| Set the time and duration of an object. | |
| getCalendarStartTime () | |
| Returns the start timestamp. | |
| getCalendarEndTime () | |
| Returns the end timestamp. | |
| getExportableValues () | |
| Returns an array of fields which can be exported. | |
| export () | |
| Export this class into an array of ODD Elements containing all necessary fields. | |
| import (ODD $data) | |
| Import data from an parsed ODD xml data array. | |
| getSystemLogID () | |
| Return an identification for the object for storage in the system log. | |
| getObjectFromID ($id) | |
| For a given ID, return the object associated with it. | |
| getTags ($tag_names=NULL) | |
| Returns tags for this entity. | |
Protected Member Functions | |
| initializeAttributes () | |
| Initialize the attributes array. | |
| load ($guid) | |
| Loads attributes from the entities table into the object. | |
Protected Attributes | |
| $url_override | |
| If set, overrides the value of getURL(). | |
| $icon_override | |
| Icon override, overrides the value of getIcon(). | |
| $temp_metadata = array() | |
| Holds metadata until entity is saved. | |
| $temp_annotations = array() | |
| Holds annotations until entity is saved. | |
| $temp_private_settings = array() | |
| Holds private settings until entity is saved. | |
| $volatile = array() | |
| Volatile data structure for this object, allows for storage of data in-memory that isn't sync'd back to the metadata table. | |
Definition at line 39 of file ElggEntity.php.
| ElggEntity::__clone | ( | ) |
Clone an entity.
Resets the guid so that the entity can be saved as a distinct entity from the original. Creation time will be set when this new entity is saved. The owner and container guids come from the original entity. The clone method copies metadata but does not copy annotations or private settings.
Definition at line 135 of file ElggEntity.php.
| ElggEntity::__unset | ( | $ | name | ) |
Unset a property from metadata or attribute.
| string | $name The name of the attribute or metadata. |
Definition at line 310 of file ElggEntity.php.
| ElggEntity::addRelationship | ( | $ | guid, | |
| $ | relationship | |||
| ) |
Add a relationship between this an another entity.
Read the relationship like "$guid is a $relationship of this entity."
| int | $guid Entity to link to. | |
| string | $relationship The type of relationship. |
Definition at line 574 of file ElggEntity.php.
| ElggEntity::annotate | ( | $ | name, | |
| $ | value, | |||
| $ | access_id = ACCESS_PRIVATE, |
|||
| $ | owner_id = 0, |
|||
| $ | vartype = "" | |||
| ) |
Adds an annotation to an entity.
| string | $name Annotation name | |
| mixed | $value Annotation value | |
| int | $access_id Access ID | |
| int | $owner_id GUID of the annotation owner | |
| string | $vartype The type of annotation value |
Definition at line 761 of file ElggEntity.php.
| ElggEntity::canAnnotate | ( | $ | user_guid = 0, |
|
| $ | annotation_name = '' | |||
| ) |
Can a user annotate an entity?
Can be overridden by registering for the permissions_check:annotate, <entity type>=""> plugin hook.
If you want logged out users to annotate an object, do not call canAnnotate(). It's easier than using the plugin hook.
| int | $user_guid User guid (default is logged in user) | |
| string | $annotation_name The name of the annotation (default is unspecified) |
Definition at line 998 of file ElggEntity.php.
| ElggEntity::canComment | ( | $ | user_guid = 0 |
) |
Can a user comment on an entity?
Can be overridden by registering for the permissions_check:comment, <entity type>=""> plugin hook.
| int | $user_guid User guid (default is logged in user) |
Reimplemented in ElggGroup, ElggObject, and ElggUser.
Definition at line 972 of file ElggEntity.php.
| ElggEntity::canEdit | ( | $ | user_guid = 0 |
) |
Can a user edit this entity.
| int | $user_guid The user GUID, optionally (default: logged in user) |
Definition at line 933 of file ElggEntity.php.
| ElggEntity::canEditMetadata | ( | $ | metadata = null, |
|
| $ | user_guid = 0 | |||
| ) |
Can a user edit metadata on this entity.
| ElggMetadata | $metadata The piece of metadata to specifically check | |
| int | $user_guid The user GUID, optionally (default: logged in user) |
Definition at line 945 of file ElggEntity.php.
| ElggEntity::canWriteToContainer | ( | $ | user_guid = 0, |
|
| $ | type = 'all', |
|||
| $ | subtype = 'all' | |||
| ) |
Can a user add an entity to this container.
| int | $user_guid The user. | |
| string | $type The type of entity we're looking to write | |
| string | $subtype The subtype of the entity we're looking to write |
Definition at line 958 of file ElggEntity.php.
| ElggEntity::clearAnnotations | ( | $ | name = "" |
) |
Remove an annotation or all annotations for this entity.
| string | $name Annotation name |
Definition at line 812 of file ElggEntity.php.
| ElggEntity::clearMetaData | ( | $ | name = '' |
) |
Remove metadata.
| string | $name The name of the metadata to clear |
Definition at line 455 of file ElggEntity.php.
| ElggEntity::clearRelationships | ( | ) |
Remove all relationships to and from this entity.
Definition at line 557 of file ElggEntity.php.
| ElggEntity::countAnnotations | ( | $ | name = "" |
) |
Count annotations.
| string | $name The type of annotation. |
Definition at line 824 of file ElggEntity.php.
| ElggEntity::countComments | ( | ) |
Count the number of comments attached to this entity.
Definition at line 878 of file ElggEntity.php.
| ElggEntity::countEntitiesFromRelationship | ( | $ | relationship, | |
| $ | inverse_relationship = FALSE | |||
| ) |
Gets the number of of entities from a specific relationship type.
| string | $relationship Relationship type (eg "friends") | |
| bool | $inverse_relationship Invert relationship |
Definition at line 917 of file ElggEntity.php.
| ElggEntity::delete | ( | $ | recursive = true |
) |
Delete this entity.
| bool | $recursive Whether to delete all the entities contained by this entity |
Definition at line 1438 of file ElggEntity.php.
| ElggEntity::deleteAnnotations | ( | $ | name = null |
) |
Deletes all annotations on this object (annotations.entity_guid = $this->guid).
If you pass a name, only annotations matching that name will be deleted.
| null|string | $name The annotations name to remove. |
Definition at line 651 of file ElggEntity.php.
| ElggEntity::deleteMetadata | ( | $ | name = null |
) |
Deletes all metadata on this object (metadata.entity_guid = $this->guid).
If you pass a name, only metadata matching that name will be deleted.
| null|string | $name The name of the metadata to remove. |
Definition at line 404 of file ElggEntity.php.
| ElggEntity::deleteOwnedAnnotations | ( | $ | name = null |
) |
Deletes all annotations owned by this object (annotations.owner_guid = $this->guid).
If you pass a name, only annotations matching that name will be deleted.
| null|string | $name The name of annotations to delete. |
Definition at line 671 of file ElggEntity.php.
| ElggEntity::deleteOwnedMetadata | ( | $ | name = null |
) |
Deletes all metadata owned by this object (metadata.owner_guid = $this->guid).
If you pass a name, only metadata matching that name will be deleted.
| null|string | $name The name of metadata to delete. |
Definition at line 429 of file ElggEntity.php.
| ElggEntity::deleteRelationships | ( | ) |
Remove all relationships to and from this entity.
Definition at line 543 of file ElggEntity.php.
| ElggEntity::disable | ( | $ | reason = "", |
|
| $ | recursive = true | |||
| ) |
Disable this entity.
Disabled entities are not returned by getter functions. To enable an entity, use enable_entity().
Recursively disabling an entity will disable all entities owned or contained by the parent entity.
Reimplemented in ElggSite.
Definition at line 1392 of file ElggEntity.php.
| ElggEntity::disableAnnotations | ( | $ | name = '' |
) |
Disables annotations for this entity, optionally based on name.
| string | $name An options name of annotations to disable. |
Definition at line 695 of file ElggEntity.php.
| ElggEntity::disableMetadata | ( | $ | name = '' |
) |
Disables metadata for this entity, optionally based on name.
| string | $name An options name of metadata to disable. |
Definition at line 467 of file ElggEntity.php.
| ElggEntity::enable | ( | ) |
Enable an entity.
Definition at line 1410 of file ElggEntity.php.
| ElggEntity::enableAnnotations | ( | $ | name = '' |
) |
Enables annotations for this entity, optionally based on name.
| string | $name An options name of annotations to enable. |
Definition at line 716 of file ElggEntity.php.
| ElggEntity::enableMetadata | ( | $ | name = '' |
) |
Enables metadata for this entity, optionally based on name.
| string | $name An options name of metadata to enable. |
Definition at line 488 of file ElggEntity.php.
| ElggEntity::export | ( | ) |
Export this class into an array of ODD Elements containing all necessary fields.
Override if you wish to return more information than can be found in $this->attributes (shouldn't happen)
Implements Exportable.
Definition at line 1587 of file ElggEntity.php.
| ElggEntity::get | ( | $ | name | ) |
Return the value of a property.
If $name is defined in $this->attributes that value is returned, otherwise it will pull from the entity's metadata.
Q: Why are we not using __get overload here? A: Because overload operators cause problems during subclassing, so we put the code here and create overloads in subclasses.
| string | $name Name |
Reimplemented from ElggData.
Reimplemented in ElggGroup, ElggPlugin, and ElggWidget.
Definition at line 188 of file ElggEntity.php.
| ElggEntity::getAccessID | ( | ) |
| ElggEntity::getAnnotations | ( | $ | name, | |
| $ | limit = 50, |
|||
| $ | offset = 0, |
|||
| $ | order = "asc" | |||
| ) |
Returns an array of annotations.
| string | $name Annotation name | |
| int | $limit Limit | |
| int | $offset Offset | |
| string | $order Order by time: asc or desc |
Definition at line 780 of file ElggEntity.php.
| ElggEntity::getAnnotationsAvg | ( | $ | name | ) |
Get the average of an integer type annotation.
| string | $name Annotation name |
Definition at line 835 of file ElggEntity.php.
| ElggEntity::getAnnotationsMax | ( | $ | name | ) |
Get the maximum of integer type annotations of a given name.
| string | $name Annotation name |
Definition at line 868 of file ElggEntity.php.
| ElggEntity::getAnnotationsMin | ( | $ | name | ) |
Get the minimum of integer type annotations of given name.
| string | $name Annotation name |
Definition at line 857 of file ElggEntity.php.
| ElggEntity::getAnnotationsSum | ( | $ | name | ) |
Get the sum of integer type annotations of a given name.
| string | $name Annotation name |
Definition at line 846 of file ElggEntity.php.
| ElggEntity::getCalendarEndTime | ( | ) |
Returns the end timestamp.
Implements Notable.
Definition at line 1554 of file ElggEntity.php.
| ElggEntity::getCalendarStartTime | ( | ) |
Returns the start timestamp.
Implements Notable.
Definition at line 1543 of file ElggEntity.php.
| ElggEntity::getContainer | ( | ) |
Gets the container GUID for this entity.
Definition at line 1132 of file ElggEntity.php.
| ElggEntity::getContainerEntity | ( | ) |
Get the container entity for this object.
Definition at line 1143 of file ElggEntity.php.
| ElggEntity::getContainerGUID | ( | ) |
Gets the container GUID for this entity.
Definition at line 1122 of file ElggEntity.php.
| ElggEntity::getEntitiesFromRelationship | ( | $ | relationship, | |
| $ | inverse = false, |
|||
| $ | limit = 50, |
|||
| $ | offset = 0 | |||
| ) |
Gets an array of entities with a relationship to this entity.
| string | $relationship Relationship type (eg "friends") | |
| bool | $inverse Is this an inverse relationship? | |
| int | $limit Number of elements to return | |
| int | $offset Indexing offset |
Definition at line 899 of file ElggEntity.php.
| ElggEntity::getExportableValues | ( | ) |
Returns an array of fields which can be exported.
Implements Exportable.
Reimplemented in ElggGroup, ElggObject, ElggSite, and ElggUser.
Definition at line 1567 of file ElggEntity.php.
| ElggEntity::getGUID | ( | ) |
| ElggEntity::getIcon | ( | $ | size = 'medium' |
) |
Returns a URL for the entity's icon.
| string | $size Either 'large', 'medium', 'small' or 'tiny' |
Definition at line 1225 of file ElggEntity.php.
| ElggEntity::getIconURL | ( | $ | size = 'medium' |
) |
Get the URL for this entity's icon.
Plugins can register for the 'entity:icon:url', <type> plugin hook to customize the icon for an entity.
| string | $size Size of the icon: tiny, small, medium, large |
Definition at line 1195 of file ElggEntity.php.
| ElggEntity::getLatitude | ( | ) |
Return the entity's latitude.
Implements Locatable.
Definition at line 1491 of file ElggEntity.php.
| ElggEntity::getLocation | ( | ) |
Gets the 'location' metadata for the entity.
Implements Locatable.
Definition at line 1451 of file ElggEntity.php.
| ElggEntity::getLongitude | ( | ) |
Return the entity's longitude.
Implements Locatable.
Definition at line 1500 of file ElggEntity.php.
| ElggEntity::getMetaData | ( | $ | name | ) |
Return the value of a piece of metadata.
| string | $name Name |
Definition at line 251 of file ElggEntity.php.
| ElggEntity::getObjectFromID | ( | $ | 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 GUID. |
Implements Loggable.
Definition at line 1723 of file ElggEntity.php.
| ElggEntity::getOwner | ( | ) |
Return the guid of the entity's owner.
Reimplemented in ElggUser.
Definition at line 1075 of file ElggEntity.php.
| ElggEntity::getOwnerEntity | ( | ) |
Gets the ElggEntity that owns this entity.
Definition at line 1085 of file ElggEntity.php.
| ElggEntity::getOwnerGUID | ( | ) |
Get the guid of the entity's owner.
Reimplemented in ElggUser.
Definition at line 1065 of file ElggEntity.php.
| ElggEntity::getPrivateSetting | ( | $ | name | ) |
Returns a private setting value.
| string | $name Name of the private setting |
Definition at line 619 of file ElggEntity.php.
| ElggEntity::getSubtype | ( | ) |
Returns the entity subtype string.
Implements Loggable.
Definition at line 1051 of file ElggEntity.php.
| ElggEntity::getSystemLogID | ( | ) |
Return an identification for the object for storage in the system log.
This id must be an integer.
Implements Loggable.
Definition at line 1706 of file ElggEntity.php.
| ElggEntity::getTags | ( | $ | tag_names = NULL |
) |
Returns tags for this entity.
| array | $tag_names Optionally restrict by tag metadata names. |
Definition at line 1736 of file ElggEntity.php.
| ElggEntity::getTimeUpdated | ( | ) |
Returns the UNIX epoch time that this entity was last updated.
Definition at line 1152 of file ElggEntity.php.
| ElggEntity::getType | ( | ) |
Returns the entity type.
Implements Loggable.
Definition at line 1040 of file ElggEntity.php.
| ElggEntity::getURL | ( | ) |
Returns the URL for this entity.
Reimplemented from ElggData.
Definition at line 1163 of file ElggEntity.php.
| ElggEntity::getVolatileData | ( | $ | name | ) |
Get a piece of volatile (non-persisted) data on this entity.
| string | $name The name of the volatile data |
Definition at line 507 of file ElggEntity.php.
| ElggEntity::import | ( | ODD $ | data | ) |
Import data from an parsed ODD xml data array.
| ODD | $data XML data |
| InvalidParameterException |
Implements Importable.
Definition at line 1677 of file ElggEntity.php.
| ElggEntity::initializeAttributes | ( | ) | [protected] |
Initialize the attributes array.
This is vital to distinguish between metadata and base parameters.
Reimplemented from ElggData.
Reimplemented in ElggFile, ElggGroup, ElggObject, ElggPlugin, ElggSite, ElggUser, and ElggWidget.
Definition at line 86 of file ElggEntity.php.
| ElggEntity::isEnabled | ( | ) |
| ElggEntity::isFullyLoaded | ( | ) |
Tests to see whether the object has been fully loaded.
Definition at line 1260 of file ElggEntity.php.
| ElggEntity::load | ( | $ | guid | ) | [protected] |
Loads attributes from the entities table into the object.
| mixed | $guid GUID of entity or stdClass object from entities table |
Reimplemented in ElggGroup, ElggObject, ElggSite, and ElggUser.
Definition at line 1336 of file ElggEntity.php.
| ElggEntity::removePrivateSetting | ( | $ | name | ) |
Removes private setting.
| string | $name Name of the private setting |
Definition at line 637 of file ElggEntity.php.
| ElggEntity::removeRelationship | ( | $ | guid, | |
| $ | relationship | |||
| ) |
Remove a relationship.
| int | $guid GUID of the entity to make a relationship with | |
| str | $relationship Name of relationship |
Definition at line 588 of file ElggEntity.php.
| ElggEntity::save | ( | ) |
Save an entity.
| IOException |
Reimplemented from ElggData.
Reimplemented in ElggFile, ElggGroup, ElggObject, ElggPlugin, ElggSite, and ElggUser.
Definition at line 1270 of file ElggEntity.php.
| ElggEntity::set | ( | $ | name, | |
| $ | value | |||
| ) |
Sets the value of a property.
If $name is defined in $this->attributes that value is set, otherwise it is saved as metadata.
Q: Why are we not using __set overload here? A: Because overload operators cause problems during subclassing, so we put the code here and create overloads in subclasses.
| string | $name Name | |
| mixed | $value Value |
Reimplemented from ElggData.
Reimplemented in ElggPlugin, and ElggWidget.
Definition at line 224 of file ElggEntity.php.
| ElggEntity::setCalendarTimeAndDuration | ( | $ | hour = NULL, |
|
| $ | minute = NULL, |
|||
| $ | second = NULL, |
|||
| $ | day = NULL, |
|||
| $ | month = NULL, |
|||
| $ | year = NULL, |
|||
| $ | duration = NULL | |||
| ) |
Set the time and duration of an object.
| int | $hour If ommitted, now is assumed. | |
| int | $minute If ommitted, now is assumed. | |
| int | $second If ommitted, now is assumed. | |
| int | $day If ommitted, now is assumed. | |
| int | $month If ommitted, now is assumed. | |
| int | $year If ommitted, now is assumed. | |
| int | $duration Duration of event, remainder of the day is assumed. |
Implements Notable.
Definition at line 1522 of file ElggEntity.php.
| ElggEntity::setContainer | ( | $ | container_guid | ) |
Set the container for this object.
| int | $container_guid The ID of the container. |
Definition at line 1110 of file ElggEntity.php.
| ElggEntity::setContainerGUID | ( | $ | container_guid | ) |
Set the container for this object.
| int | $container_guid The ID of the container. |
Definition at line 1096 of file ElggEntity.php.
| ElggEntity::setIcon | ( | $ | url, | |
| $ | size = 'medium' | |||
| ) |
Set an icon override for an icon and size.
| string | $url The url of the icon. | |
| string | $size The size its for. |
Definition at line 1241 of file ElggEntity.php.
| ElggEntity::setLatLong | ( | $ | lat, | |
| $ | long | |||
| ) |
Set latitude and longitude metadata tags for a given entity.
| float | $lat Latitude | |
| float | $long Longitude |
Implements Locatable.
Definition at line 1478 of file ElggEntity.php.
| ElggEntity::setLocation | ( | $ | location | ) |
Sets the 'location' metadata for the entity.
| string | $location String representation of the location |
Implements Locatable.
Definition at line 1464 of file ElggEntity.php.
| ElggEntity::setMetaData | ( | $ | name, | |
| $ | value, | |||
| $ | value_type = null, |
|||
| $ | multiple = false | |||
| ) |
Set a piece of metadata.
Plugin authors should use the magic methods or create_metadata().
private
| string | $name Name of the metadata | |
| mixed | $value Value of the metadata (doesn't support assoc arrays) | |
| string | $value_type Types supported: integer and string. Will auto-identify if not set | |
| bool | $multiple Allow multiple values for a single name (doesn't support assoc arrays) |
Definition at line 335 of file ElggEntity.php.
| ElggEntity::setPrivateSetting | ( | $ | name, | |
| $ | value | |||
| ) |
Adds a private setting to this entity.
Private settings are similar to metadata but will not be searched and there are fewer helper functions for them.
| string | $name Name of private setting | |
| mixed | $value Value of private setting |
Definition at line 603 of file ElggEntity.php.
| ElggEntity::setURL | ( | $ | url | ) |
Overrides the URL returned by getURL().
| string | $url The new item URL |
Definition at line 1179 of file ElggEntity.php.
| ElggEntity::setVolatileData | ( | $ | name, | |
| $ | value | |||
| ) |
Set a piece of volatile (non-persisted) data on this entity.
| string | $name Name | |
| mixed | $value Value |
Definition at line 527 of file ElggEntity.php.
ElggEntity::$icon_override [protected] |
Icon override, overrides the value of getIcon().
Definition at line 53 of file ElggEntity.php.
ElggEntity::$temp_annotations = array() [protected] |
Holds annotations until entity is saved.
Once the entity is saved, annotations are written immediately to the database.
Definition at line 65 of file ElggEntity.php.
ElggEntity::$temp_metadata = array() [protected] |
Holds metadata until entity is saved.
Once the entity is saved, metadata are written immediately to the database.
Definition at line 59 of file ElggEntity.php.
ElggEntity::$temp_private_settings = array() [protected] |
Holds private settings until entity is saved.
Once the entity is saved, private settings are written immediately to the database.
Definition at line 71 of file ElggEntity.php.
ElggEntity::$url_override [protected] |
If set, overrides the value of getURL().
Definition at line 48 of file ElggEntity.php.
ElggEntity::$volatile = array() [protected] |
Volatile data structure for this object, allows for storage of data in-memory that isn't sync'd back to the metadata table.
Definition at line 77 of file ElggEntity.php.
1.6.3