PHP 클래스 ElggEntity, Elgg

저자: Curverider Ltd ([email protected])
상속: implements Notable, implements Locatable, implements Exportable, implements Importable, implements Loggable, implements Iterator, implements ArrayAccess
파일 보기 프로젝트 열기: elgg/elgg 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$orig_attributes Holds the original (persisted) attribute values that have been changed but not yet saved.
$temp_annotations Holds annotations until entity is saved. Once the entity is saved, annotations are written immediately to the database.
$temp_metadata Holds metadata until entity is saved. Once the entity is saved, metadata are written immediately to the database.
$temp_private_settings Holds private settings until entity is saved. Once the entity is saved, private settings are written immediately to the database.
$url_override If set, overrides the value of getURL()
$volatile Volatile data structure for this object, allows for storage of data in-memory that isn't sync'd back to the metadata table.

공개 메소드들

메소드 설명
__clone ( ) : void Clone an entity
__get ( string $name ) : mixed Get an attribute or metadata value
__set ( string $name, mixed $value ) : void Set an attribute or metadata value for this entity
__unset ( string $name ) : void Unset a property from metadata or attribute.
addRelationship ( integer $guid_two, string $relationship ) : boolean Add a relationship between this an another entity.
annotate ( string $name, mixed $value, integer $access_id = ACCESS_PRIVATE, integer $owner_guid, string $vartype = "" ) : boolean | integer Adds an annotation to an entity.
canAnnotate ( integer $user_guid, string $annotation_name = '' ) : boolean Can a user annotate an entity?
canComment ( integer $user_guid, boolean $default = null ) : boolean Can a user comment on an entity?
canDelete ( integer $user_guid ) : boolean Can a user delete this entity?
canEdit ( integer $user_guid ) : boolean Can a user edit this entity?
canEditMetadata ( ElggMetadata $metadata = null, integer $user_guid ) : boolean Can a user edit metadata on this entity?
canWriteToContainer ( integer $user_guid, string $type = 'all', string $subtype = 'all' ) : boolean Can a user add an entity to this container
countAnnotations ( string $name = "" ) : integer Count annotations.
countComments ( ) : integer Count the number of comments attached to this entity.
countEntitiesFromRelationship ( string $relationship, boolean $inverse_relationship = false ) : integer | false Gets the number of entities from a specific relationship type
delete ( boolean $recursive = true ) : boolean Deletes the entity.
deleteAccessCollectionMemberships ( ) : boolean Remove the membership of all access collections for this entity (if the entity is a user)
deleteAnnotations ( null | string $name = null ) : boolean Deletes all annotations on this object (annotations.entity_guid = $this->guid).
deleteIcon ( string $type = 'icon' ) : boolean Removes all icon files and metadata for the passed type of icon.
deleteMetadata ( null | string $name = null ) : boolean Deletes all metadata on this object (metadata.entity_guid = $this->guid).
deleteOwnedAccessCollections ( ) : boolean Remove all access collections owned by this entity
deleteOwnedAnnotations ( null | string $name = null ) : boolean Deletes all annotations owned by this object (annotations.owner_guid = $this->guid).
deleteOwnedMetadata ( null | string $name = null ) : boolean Deletes all metadata owned by this object (metadata.owner_guid = $this->guid).
deleteRelationships ( null | string $relationship = null ) : boolean Remove all relationships to and from this entity.
disable ( string $reason = "", boolean $recursive = true ) : boolean Disable this entity.
disableAnnotations ( string $name = '' ) : boolean Disables annotations for this entity, optionally based on name.
disableMetadata ( string $name = '' ) : boolean Disables metadata for this entity, optionally based on name.
enable ( boolean $recursive = true ) : boolean Enable the entity
enableAnnotations ( string $name = '' ) : boolean Enables annotations for this entity, optionally based on name.
enableMetadata ( string $name = '' ) : boolean Enables metadata for this entity, optionally based on name.
getAccessID ( ) : integer Returns the access_id.
getAnnotations ( array $options = [] ) : array Gets an array of annotations.
getAnnotationsAvg ( string $name ) : integer Get the average of an integer type annotation.
getAnnotationsMax ( string $name ) : integer Get the maximum of integer type annotations of a given name.
getAnnotationsMin ( string $name ) : integer Get the minimum of integer type annotations of given name.
getAnnotationsSum ( string $name ) : integer Get the sum of integer type annotations of a given name.
getContainerEntity ( ) : ElggEntity Get the container entity for this object.
getContainerGUID ( ) : integer Gets the container GUID for this entity.
getDisplayName ( ) : string Get the entity's display name
getEntitiesFromRelationship ( array $options = [] ) : array | false Gets an array of entities with a relationship to this entity.
getGUID ( ) : integer | null Returns the guid.
getIcon ( string $size, string $type = 'icon' ) : ElggIcon Returns entity icon as an ElggIcon object The icon file may or may not exist on filestore
getIconLastChange ( string $size, string $type = 'icon' ) : integer | null Returns the timestamp of when the icon was changed.
getIconURL ( mixed $params = [] ) : string Get the URL for this entity's icon
getLatitude ( ) : float Return the entity's latitude.
getLocation ( ) : string Gets the 'location' metadata for the entity
getLongitude ( ) : float Return the entity's longitude
getMetadata ( string $name ) : mixed Return the value of a piece of metadata.
getObjectFromID ( integer $id ) : integer For a given ID, return the object associated with it.
getOriginalAttributes ( ) : array Get the original values of attribute(s) that have been modified since the entity was persisted.
getOwnerEntity ( ) : ElggEntity Gets the \ElggEntity that owns this entity.
getOwnerGUID ( ) : integer Get the guid of the entity's owner.
getPrivateSetting ( string $name ) : mixed Returns a private setting value
getSubtype ( ) : string Get the entity subtype
getSystemLogID ( ) : integer Return an identification for the object for storage in the system log.
getTags ( array $tag_names = null ) : array Returns tags for this entity.
getTimeUpdated ( ) : integer Returns the UNIX epoch time that this entity was last updated
getType ( ) : string Returns the entity type
getURL ( ) : string Gets the URL for this entity.
getVolatileData ( string $name ) : mixed Get a piece of volatile (non-persisted) data on this entity.
hasIcon ( string $size, string $type = 'icon' ) : boolean Returns if the entity has an icon of the passed type.
isEnabled ( ) : boolean Is this entity enabled?
isFullyLoaded ( ) : boolean Tests to see whether the object has been persisted.
refresh ( stdClass $row ) : boolean Load new data from database into existing entity. Overwrites data but does not change values not included in the latest data.
removePrivateSetting ( string $name ) : boolean Removes private setting
removeRelationship ( integer $guid_two, string $relationship ) : boolean Remove a relationship
save ( ) : boolean | integer Save an entity.
saveIconFromElggFile ( ElggFile $file, string $type = 'icon', array $coords = [] ) : boolean Saves icons using a file located in the data store as the source.
saveIconFromLocalFile ( string $filename, string $type = 'icon', array $coords = [] ) : boolean Saves icons using a local file as the source.
saveIconFromUploadedFile ( string $input_name, string $type = 'icon', array $coords = [] ) : boolean Saves icons using an uploaded file as the source.
setContainerGUID ( integer $container_guid ) : boolean Set the container for this object.
setDisplayName ( string $displayName ) : void Sets the title or name of this entity.
setLatLong ( float $lat, float $long ) : void Set latitude and longitude metadata tags for a given entity.
setLocation ( string $location ) : void Sets the 'location' metadata for the entity
setMetadata ( string $name, mixed $value, string $value_type = '', boolean $multiple = false, integer $owner_guid, integer $access_id = null ) : boolean Set metadata on this entity.
setPrivateSetting ( string $name, mixed $value ) : boolean Adds a private setting to this entity.
setVolatileData ( string $name, mixed $value ) : void Set a piece of volatile (non-persisted) data on this entity
storeInPersistedCache ( ElggSharedMemoryCache $cache, integer $last_action ) : void Cache the entity in a persisted cache
toObject ( )
updateLastAction ( integer $posted = null ) : integer | false Update the last_action column in the entities table.

보호된 메소드들

메소드 설명
create ( ) : integer Create a new entry in the entities table.
initializeAttributes ( ) : void Initialize the attributes array.
load ( mixed $guid ) : boolean Loads attributes from the entities table into the object.
loadAdditionalSelectValues ( array $data ) : void Stores non-attributes from the loading of the entity as volatile data
prepareObject ( stdClass $object ) : stdClass Prepare an object copy for toObject()
update ( ) : boolean Update the entity in the database.

비공개 메소드들

메소드 설명
getAnnotationCalculation ( string $name, string $calculation ) : mixed Helper function to return annotation calculation results

메소드 상세

__clone() 공개 메소드

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.
public __clone ( ) : void
리턴 void

__get() 공개 메소드

If the name matches an attribute, the attribute is returned. If metadata does not exist with that name, a null is returned. This only returns an array if there are multiple values for a particular $name key.
public __get ( string $name ) : mixed
$name string Name of the attribute or metadata
리턴 mixed

__set() 공개 메소드

Anything that is not an attribute is saved as metadata.
또한 보기: ElggEntity::setMetadata()
public __set ( string $name, mixed $value ) : void
$name string Name of the attribute or metadata
$value mixed The value to be set
리턴 void

__unset() 공개 메소드

Unset a property from metadata or attribute.
public __unset ( string $name ) : void
$name string The name of the attribute or metadata.
리턴 void

addRelationship() 공개 메소드

Add a relationship between this an another entity.
또한 보기: ElggEntity::removeRelationship()
또한 보기: ElggEntity::deleteRelationships()
public addRelationship ( integer $guid_two, string $relationship ) : boolean
$guid_two integer GUID of the target entity of the relationship.
$relationship string The type of relationship.
리턴 boolean

annotate() 공개 메소드

Adds an annotation to an entity.
public annotate ( string $name, mixed $value, integer $access_id = ACCESS_PRIVATE, integer $owner_guid, string $vartype = "" ) : boolean | integer
$name string Annotation name
$value mixed Annotation value
$access_id integer Access ID
$owner_guid integer GUID of the annotation owner
$vartype string The type of annotation value
리턴 boolean | integer Returns int if an annotation is saved

canAnnotate() 공개 메소드

Can a user annotate an entity?
public canAnnotate ( integer $user_guid, string $annotation_name = '' ) : boolean
$user_guid integer User guid (default is logged in user)
$annotation_name string The name of the annotation (default is unspecified)
리턴 boolean

canComment() 공개 메소드

Can a user comment on an entity?
public canComment ( integer $user_guid, boolean $default = null ) : boolean
$user_guid integer User guid (default is logged in user)
$default boolean Default permission
리턴 boolean

canDelete() 공개 메소드

Can a user delete this entity?
또한 보기: elgg_set_ignore_access()
부터: 1.11
public canDelete ( integer $user_guid ) : boolean
$user_guid integer The user GUID, optionally (default: logged in user)
리턴 boolean Whether this entity is deletable by the given user.

canEdit() 공개 메소드

Can a user edit this entity?
또한 보기: elgg_set_ignore_access()
public canEdit ( integer $user_guid ) : boolean
$user_guid integer The user GUID, optionally (default: logged in user)
리턴 boolean Whether this entity is editable by the given user.

canEditMetadata() 공개 메소드

If no specific metadata is passed, it returns whether the user can edit any metadata on the entity.
또한 보기: elgg_set_ignore_access()
public canEditMetadata ( ElggMetadata $metadata = null, integer $user_guid ) : boolean
$metadata ElggMetadata The piece of metadata to specifically check or null for any metadata
$user_guid integer The user GUID, optionally (default: logged in user)
리턴 boolean

canWriteToContainer() 공개 메소드

Can a user add an entity to this container
또한 보기: elgg_set_ignore_access()
public canWriteToContainer ( integer $user_guid, string $type = 'all', string $subtype = 'all' ) : boolean
$user_guid integer The GUID of the user creating the entity (0 for logged in user).
$type string The type of entity we're looking to write
$subtype string The subtype of the entity we're looking to write
리턴 boolean

countAnnotations() 공개 메소드

Count annotations.
public countAnnotations ( string $name = "" ) : integer
$name string The type of annotation.
리턴 integer

countComments() 공개 메소드

Count the number of comments attached to this entity.
부터: 1.8.0
public countComments ( ) : integer
리턴 integer Number of comments

countEntitiesFromRelationship() 공개 메소드

Gets the number of entities from a specific relationship type
public countEntitiesFromRelationship ( string $relationship, boolean $inverse_relationship = false ) : integer | false
$relationship string Relationship type (eg "friends")
$inverse_relationship boolean Invert relationship
리턴 integer | false The number of entities or false on failure

create() 보호된 메소드

Saves the base information in the entities table for the entity. Saving the type-specific information is handled in the calling class method.
protected create ( ) : integer
리턴 integer The new entity's GUID

delete() 공개 메소드

Removes the entity and its metadata, annotations, relationships, river entries, and private data. Optionally can remove entities contained and owned by this entity.
public delete ( boolean $recursive = true ) : boolean
$recursive boolean If true (default) then all entities which are owned or contained by $this will also be deleted.
리턴 boolean

deleteAccessCollectionMemberships() 공개 메소드

Remove the membership of all access collections for this entity (if the entity is a user)
부터: 1.11

deleteAnnotations() 공개 메소드

If you pass a name, only annotations matching that name will be deleted.
부터: 1.8
public deleteAnnotations ( null | string $name = null ) : boolean
$name null | string The annotations name to remove.
리턴 boolean

deleteIcon() 공개 메소드

Removes all icon files and metadata for the passed type of icon.
public deleteIcon ( string $type = 'icon' ) : boolean
$type string The name of the icon. e.g., 'icon', 'cover_photo'
리턴 boolean

deleteMetadata() 공개 메소드

If you pass a name, only metadata matching that name will be deleted.
부터: 1.8
public deleteMetadata ( null | string $name = null ) : boolean
$name null | string The name of the metadata to remove.
리턴 boolean

deleteOwnedAccessCollections() 공개 메소드

Remove all access collections owned by this entity
부터: 1.11

deleteOwnedAnnotations() 공개 메소드

If you pass a name, only annotations matching that name will be deleted.
부터: 1.8
public deleteOwnedAnnotations ( null | string $name = null ) : boolean
$name null | string The name of annotations to delete.
리턴 boolean

deleteOwnedMetadata() 공개 메소드

If you pass a name, only metadata matching that name will be deleted.
부터: 1.8
public deleteOwnedMetadata ( null | string $name = null ) : boolean
$name null | string The name of metadata to delete.
리턴 boolean

deleteRelationships() 공개 메소드

If you pass a relationship name, only relationships matching that name will be deleted.
또한 보기: ElggEntity::addRelationship()
또한 보기: ElggEntity::removeRelationship()
public deleteRelationships ( null | string $relationship = null ) : boolean
$relationship null | string The name of the relationship to remove.
리턴 boolean

disable() 공개 메소드

Disabled entities are not returned by getter functions. To enable an entity, use {@link \ElggEntity::enable()}. Recursively disabling an entity will disable all entities owned or contained by the parent entity. You can ignore the disabled field by using {@link access_show_hidden_entities()}.
또한 보기: ElggEntity::enable()
public disable ( string $reason = "", boolean $recursive = true ) : boolean
$reason string Optional reason
$recursive boolean Recursively disable all contained entities?
리턴 boolean

disableAnnotations() 공개 메소드

Disables annotations for this entity, optionally based on name.
부터: 1.8
public disableAnnotations ( string $name = '' ) : boolean
$name string An options name of annotations to disable.
리턴 boolean

disableMetadata() 공개 메소드

Disables metadata for this entity, optionally based on name.
부터: 1.8
public disableMetadata ( string $name = '' ) : boolean
$name string An options name of metadata to disable.
리턴 boolean

enable() 공개 메소드

Enable the entity
또한 보기: access_show_hiden_entities()
public enable ( boolean $recursive = true ) : boolean
$recursive boolean Recursively enable all entities disabled with the entity?
리턴 boolean

enableAnnotations() 공개 메소드

Enables annotations for this entity, optionally based on name.
부터: 1.8
public enableAnnotations ( string $name = '' ) : boolean
$name string An options name of annotations to enable.
리턴 boolean

enableMetadata() 공개 메소드

Enables metadata for this entity, optionally based on name.
부터: 1.8
public enableMetadata ( string $name = '' ) : boolean
$name string An options name of metadata to enable.
리턴 boolean

getAccessID() 공개 메소드

Returns the access_id.
public getAccessID ( ) : integer
리턴 integer The access ID

getAnnotations() 공개 메소드

To retrieve annotations on an unsaved entity, pass array('name' => [annotation name]) as the options array.
또한 보기: elgg_get_annotations()
public getAnnotations ( array $options = [] ) : array
$options array Array of options for elgg_get_annotations() except guid.
리턴 array

getAnnotationsAvg() 공개 메소드

Get the average of an integer type annotation.
public getAnnotationsAvg ( string $name ) : integer
$name string Annotation name
리턴 integer

getAnnotationsMax() 공개 메소드

Get the maximum of integer type annotations of a given name.
public getAnnotationsMax ( string $name ) : integer
$name string Annotation name
리턴 integer

getAnnotationsMin() 공개 메소드

Get the minimum of integer type annotations of given name.
public getAnnotationsMin ( string $name ) : integer
$name string Annotation name
리턴 integer

getAnnotationsSum() 공개 메소드

Get the sum of integer type annotations of a given name.
public getAnnotationsSum ( string $name ) : integer
$name string Annotation name
리턴 integer

getContainerEntity() 공개 메소드

Get the container entity for this object.
부터: 1.8.0
public getContainerEntity ( ) : ElggEntity
리턴 ElggEntity

getContainerGUID() 공개 메소드

Gets the container GUID for this entity.
public getContainerGUID ( ) : integer
리턴 integer

getDisplayName() 추상적인 공개 메소드

Get the entity's display name
abstract public getDisplayName ( ) : string
리턴 string The title or name of this entity.

getEntitiesFromRelationship() 공개 메소드

Gets an array of entities with a relationship to this entity.
또한 보기: elgg_get_entities_from_relationship()
public getEntitiesFromRelationship ( array $options = [] ) : array | false
$options array Options array. See elgg_get_entities_from_relationship() for a list of options. 'relationship_guid' is set to this entity.
리턴 array | false An array of entities or false on failure

getGUID() 공개 메소드

Returns the guid.
public getGUID ( ) : integer | null
리턴 integer | null GUID

getIcon() 공개 메소드

Returns entity icon as an ElggIcon object The icon file may or may not exist on filestore
public getIcon ( string $size, string $type = 'icon' ) : ElggIcon
$size string Size of the icon
$type string The name of the icon. e.g., 'icon', 'cover_photo'
리턴 ElggIcon

getIconLastChange() 공개 메소드

Returns the timestamp of when the icon was changed.
public getIconLastChange ( string $size, string $type = 'icon' ) : integer | null
$size string The size of the icon
$type string The name of the icon. e.g., 'icon', 'cover_photo'
리턴 integer | null A unix timestamp of when the icon was last changed, or null if not set.

getIconURL() 공개 메소드

Plugins can register for the 'entity:icon:url', plugin hook to customize the icon for an entity.
부터: 1.8.0
public getIconURL ( mixed $params = [] ) : string
$params mixed A string defining the size of the icon (e.g. tiny, small, medium, large) or an array of parameters including 'size'
리턴 string The URL

getLatitude() 공개 메소드

Return the entity's latitude.
public getLatitude ( ) : float
리턴 float

getLocation() 공개 메소드

Gets the 'location' metadata for the entity
public getLocation ( ) : string
리턴 string The location

getLongitude() 공개 메소드

Return the entity's longitude
public getLongitude ( ) : float
리턴 float

getMetadata() 공개 메소드

Return the value of a piece of metadata.
public getMetadata ( string $name ) : mixed
$name string Name
리턴 mixed The value, or null if not found.

getObjectFromID() 공개 메소드

This is used by the system log. It can be called on any Loggable object.
public getObjectFromID ( integer $id ) : integer
$id integer GUID.
리턴 integer GUID

getOriginalAttributes() 공개 메소드

Get the original values of attribute(s) that have been modified since the entity was persisted.
public getOriginalAttributes ( ) : array
리턴 array

getOwnerEntity() 공개 메소드

Gets the \ElggEntity that owns this entity.
public getOwnerEntity ( ) : ElggEntity
리턴 ElggEntity The owning entity

getOwnerGUID() 공개 메소드

Get the guid of the entity's owner.
public getOwnerGUID ( ) : integer
리턴 integer The owner GUID

getPrivateSetting() 공개 메소드

Returns a private setting value
public getPrivateSetting ( string $name ) : mixed
$name string Name of the private setting
리턴 mixed Null if the setting does not exist

getSubtype() 공개 메소드

Get the entity subtype
public getSubtype ( ) : string
리턴 string The entity subtype

getSystemLogID() 공개 메소드

This id must be an integer.
public getSystemLogID ( ) : integer
리턴 integer

getTags() 공개 메소드

Returns tags for this entity.
public getTags ( array $tag_names = null ) : array
$tag_names array Optionally restrict by tag metadata names.
리턴 array

getTimeUpdated() 공개 메소드

Returns the UNIX epoch time that this entity was last updated
public getTimeUpdated ( ) : integer
리턴 integer UNIX epoch time

getType() 공개 메소드

Returns the entity type
public getType ( ) : string
리턴 string The entity type

getURL() 공개 메소드

Plugins can register for the 'entity:url', plugin hook to customize the url for an entity.
public getURL ( ) : string
리턴 string The URL of the entity

getVolatileData() 공개 메소드

Get a piece of volatile (non-persisted) data on this entity.
public getVolatileData ( string $name ) : mixed
$name string The name of the volatile data
리턴 mixed The value or null if not found.

hasIcon() 공개 메소드

Returns if the entity has an icon of the passed type.
public hasIcon ( string $size, string $type = 'icon' ) : boolean
$size string The size of the icon
$type string The name of the icon. e.g., 'icon', 'cover_photo'
리턴 boolean

initializeAttributes() 보호된 메소드

This is vital to distinguish between metadata and base parameters.
protected initializeAttributes ( ) : void
리턴 void

isEnabled() 공개 메소드

Is this entity enabled?
public isEnabled ( ) : boolean
리턴 boolean Whether this entity is enabled.

isFullyLoaded() 공개 메소드

Tests to see whether the object has been persisted.
public isFullyLoaded ( ) : boolean
리턴 boolean

load() 보호된 메소드

Loads attributes from the entities table into the object.
protected load ( mixed $guid ) : boolean
$guid mixed GUID of entity or \stdClass object from entities table
리턴 boolean

loadAdditionalSelectValues() 보호된 메소드

Stores non-attributes from the loading of the entity as volatile data
protected loadAdditionalSelectValues ( array $data ) : void
$data array Key value array
리턴 void

prepareObject() 보호된 메소드

Prepare an object copy for toObject()
protected prepareObject ( stdClass $object ) : stdClass
$object stdClass Object representation of the entity
리턴 stdClass

refresh() 공개 메소드

Load new data from database into existing entity. Overwrites data but does not change values not included in the latest data.
public refresh ( stdClass $row ) : boolean
$row stdClass DB row with new entity data
리턴 boolean

removePrivateSetting() 공개 메소드

Removes private setting
public removePrivateSetting ( string $name ) : boolean
$name string Name of the private setting
리턴 boolean

removeRelationship() 공개 메소드

Remove a relationship
또한 보기: ElggEntity::addRelationship()
또한 보기: ElggEntity::deleteRelationships()
public removeRelationship ( integer $guid_two, string $relationship ) : boolean
$guid_two integer GUID of the target entity of the relationship.
$relationship string The type of relationship.
리턴 boolean

save() 공개 메소드

Save an entity.
public save ( ) : boolean | integer
리턴 boolean | integer

saveIconFromElggFile() 공개 메소드

Saves icons using a file located in the data store as the source.
public saveIconFromElggFile ( ElggFile $file, string $type = 'icon', array $coords = [] ) : boolean
$file ElggFile An ElggFile instance
$type string The name of the icon. e.g., 'icon', 'cover_photo'
$coords array An array of cropping coordinates x1, y1, x2, y2
리턴 boolean

saveIconFromLocalFile() 공개 메소드

Saves icons using a local file as the source.
public saveIconFromLocalFile ( string $filename, string $type = 'icon', array $coords = [] ) : boolean
$filename string The full path to the local file
$type string The name of the icon. e.g., 'icon', 'cover_photo'
$coords array An array of cropping coordinates x1, y1, x2, y2
리턴 boolean

saveIconFromUploadedFile() 공개 메소드

Saves icons using an uploaded file as the source.
public saveIconFromUploadedFile ( string $input_name, string $type = 'icon', array $coords = [] ) : boolean
$input_name string Form input name
$type string The name of the icon. e.g., 'icon', 'cover_photo'
$coords array An array of cropping coordinates x1, y1, x2, y2
리턴 boolean

setContainerGUID() 공개 메소드

Set the container for this object.
public setContainerGUID ( integer $container_guid ) : boolean
$container_guid integer The ID of the container.
리턴 boolean

setDisplayName() 추상적인 공개 메소드

Sets the title or name of this entity.
abstract public setDisplayName ( string $displayName ) : void
$displayName string The title or name of this entity.
리턴 void

setLatLong() 공개 메소드

Set latitude and longitude metadata tags for a given entity.
public setLatLong ( float $lat, float $long ) : void
$lat float Latitude
$long float Longitude
리턴 void

setLocation() 공개 메소드

Sets the 'location' metadata for the entity
public setLocation ( string $location ) : void
$location string String representation of the location
리턴 void

setMetadata() 공개 메소드

Plugin developers usually want to use the magic set method ($entity->name = 'value'). Use this method if you want to explicitly set the owner or access of the metadata. You cannot set the owner/access before the entity has been saved.
public setMetadata ( string $name, mixed $value, string $value_type = '', boolean $multiple = false, integer $owner_guid, integer $access_id = null ) : boolean
$name string Name of the metadata
$value mixed Value of the metadata (doesn't support assoc arrays)
$value_type string 'text', 'integer', or '' for automatic detection
$multiple boolean Allow multiple values for a single name. Does not support associative arrays.
$owner_guid integer GUID of entity that owns the metadata. Default is owner of entity.
$access_id integer Who can read the metadata relative to the owner (deprecated). Default is the access level of the entity. Use ACCESS_PUBLIC for compatibility with Elgg 3.0
리턴 boolean

setPrivateSetting() 공개 메소드

Private settings are similar to metadata but will not be searched and there are fewer helper functions for them.
public setPrivateSetting ( string $name, mixed $value ) : boolean
$name string Name of private setting
$value mixed Value of private setting
리턴 boolean

setVolatileData() 공개 메소드

Set a piece of volatile (non-persisted) data on this entity
public setVolatileData ( string $name, mixed $value ) : void
$name string Name
$value mixed Value
리턴 void

storeInPersistedCache() 공개 메소드

Cache the entity in a persisted cache
public storeInPersistedCache ( ElggSharedMemoryCache $cache, integer $last_action ) : void
$cache ElggSharedMemoryCache Memcache or null cache
$last_action integer Last action time
리턴 void

toObject() 공개 메소드

public toObject ( )

update() 보호된 메소드

Update the entity in the database.
protected update ( ) : boolean
리턴 boolean Whether the update was successful.

updateLastAction() 공개 메소드

Update the last_action column in the entities table.
public updateLastAction ( integer $posted = null ) : integer | false
$posted integer Timestamp of last action
리턴 integer | false

프로퍼티 상세

$orig_attributes 보호되어 있는 프로퍼티

Holds the original (persisted) attribute values that have been changed but not yet saved.
protected $orig_attributes

$temp_annotations 보호되어 있는 프로퍼티

Holds annotations until entity is saved. Once the entity is saved, annotations are written immediately to the database.
protected $temp_annotations

$temp_metadata 보호되어 있는 프로퍼티

Holds metadata until entity is saved. Once the entity is saved, metadata are written immediately to the database.
protected $temp_metadata

$temp_private_settings 보호되어 있는 프로퍼티

Holds private settings until entity is saved. Once the entity is saved, private settings are written immediately to the database.
protected $temp_private_settings

$url_override 보호되어 있는 프로퍼티

If set, overrides the value of getURL()
protected $url_override

$volatile 보호되어 있는 프로퍼티

Volatile data structure for this object, allows for storage of data in-memory that isn't sync'd back to the metadata table.
protected $volatile