engine/lib/entities.php File Reference

Go to the source code of this file.

Namespaces

namespace  Elgg::Core
 

Activate a plugin or plugins.


Functions

 _elgg_invalidate_cache_for_entity ($guid)
 Invalidate this class's entry in the cache.
 _elgg_cache_entity (ElggEntity $entity)
 Cache an entity.
 _elgg_retrieve_cached_entity ($guid)
 Retrieve a entity from the cache.
 get_subtype_id ($type, $subtype)
 Return the id for a given subtype.
 get_subtype_from_id ($subtype_id)
 Return string name for a given subtype ID.
 _elgg_retrieve_cached_subtype ($type, $subtype)
 Retrieve subtype from the cache.
 _elgg_populate_subtype_cache ()
 Fetch all suptypes from DB to local cache.
 get_subtype_class ($type, $subtype)
 Return the class name for a registered type and subtype.
 get_subtype_class_from_id ($subtype_id)
 Returns the class name for a subtype id.
 add_subtype ($type, $subtype, $class="")
 Register ElggEntities with a certain type and subtype to be loaded as a specific class.
 remove_subtype ($type, $subtype)
 Removes a registered ElggEntity type, subtype, and classname.
 update_subtype ($type, $subtype, $class= '')
 Update a registered ElggEntity type, subtype, and class name.
 update_entity ($guid, $owner_guid, $access_id, $container_guid=null, $time_created=null)
 Update an entity in the database.
 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.
 create_entity ($type, $subtype, $owner_guid, $access_id, $site_guid=0, $container_guid=0)
 Create a new entry in the entities table.
 get_entity_as_row ($guid)
 Returns a database row from the entities table.
 entity_row_to_elggstar ($row)
 Create an Elgg* object from a given entity row.
 get_entity ($guid)
 Loads and returns an entity object from a guid.
 elgg_entity_exists ($guid)
 Does an entity exist?
 elgg_get_entities (array $options=array())
 Returns an array of entities with optional filtering.
 _elgg_fetch_entities_from_sql ($sql)
 Return entities from an SQL query generated by elgg_get_entities.
 elgg_get_entity_type_subtype_where_sql ($table, $types, $subtypes, $pairs)
 Returns SQL where clause for type and subtype on main entity table.
 elgg_get_guid_based_where_sql ($column, $guids)
 Returns SQL where clause for owner and containers.
 elgg_get_entity_time_where_sql ($table, $time_created_upper=NULL, $time_created_lower=NULL, $time_updated_upper=NULL, $time_updated_lower=NULL)
 Returns SQL where clause for entity time limits.
 elgg_list_entities (array $options=array(), $getter= 'elgg_get_entities', $viewer= 'elgg_view_entity_list')
 Returns a string of parsed entities.
 get_entity_dates ($type= '', $subtype= '', $container_guid=0, $site_guid=0, $order_by= 'time_created')
 Returns a list of months in which entities were updated or created.
 disable_entity ($guid, $reason="", $recursive=true)
 Disable an entity.
 enable_entity ($guid, $recursive=true)
 Enable an entity.
 delete_entity ($guid, $recursive=true)
 Delete an entity.
 volatile_data_export_plugin_hook ($hook, $entity_type, $returnvalue, $params)
 Exports attributes generated on the fly (volatile) about an entity.
 export_entity_plugin_hook ($hook, $entity_type, $returnvalue, $params)
 Exports all attributes of an entity.
 oddentity_to_elggentity (ODDEntity $element)
 Utility function used by import_entity_plugin_hook() to process an ODDEntity into an unsaved ElggEntity.
 import_entity_plugin_hook ($hook, $entity_type, $returnvalue, $params)
 Import an entity.
 can_edit_entity ($entity_guid, $user_guid=0)
 Returns if $user_guid is able to edit $entity_guid.
 can_edit_entity_metadata ($entity_guid, $user_guid=0, $metadata=null)
 Returns if $user_guid can edit the metadata on $entity_guid.
 get_entity_url ($entity_guid)
 Returns the URL for an entity.
 elgg_register_entity_url_handler ($entity_type, $entity_subtype, $function_name)
 Sets the URL handler for a particular entity type and subtype.
 elgg_register_entity_type ($type, $subtype=null)
 Registers an entity type and subtype as a public-facing entity that should be shown in search and by elgg_list_registered_entities().
 unregister_entity_type ($type, $subtype)
 Unregisters an entity type and subtype as a public-facing entity.
 get_registered_entity_types ($type=null)
 Returns registered entity types and subtypes.
 is_registered_entity_type ($type, $subtype=null)
 Returns if the entity type and subtype have been registered with {.
 entities_page_handler ($page)
 Page handler for generic entities view system.
 elgg_list_registered_entities (array $options=array())
 Returns a viewable list of entities based on the registered types.
 elgg_instanceof ($entity, $type=NULL, $subtype=NULL, $class=NULL)
 Checks if $entity is an ElggEntity and optionally for type and subtype.
 update_entity_last_action ($guid, $posted=NULL)
 Update the last_action column in the entities table for $guid.
 entities_gc ()
 Garbage collect stub and fragments from any broken delete/create calls.
 entities_test ($hook, $type, $value, $params)
 Runs unit tests for the entity objects.
 entities_init ()
 Entities init function; establishes the default entity page handler.

Variables

global $ENTITY_CACHE = array()
 Cache entities in memory once loaded.
global $SUBTYPE_CACHE = null
 Cache subtypes and related class names.

Function Documentation

_elgg_cache_entity ( ElggEntity entity  ) 

Cache an entity.

Stores an entity in $ENTITY_CACHE;

Parameters:
ElggEntity $entity Entity to cache
Returns:
void
See also:
_elgg_retrieve_cached_entity()
_elgg_invalidate_cache_for_entity() private

Definition at line 59 of file entities.php.

_elgg_fetch_entities_from_sql ( sql  ) 

Return entities from an SQL query generated by elgg_get_entities.

Parameters:
string $sql
Returns:
ElggEntity[]

private

Exceptions:
LogicException 

Definition at line 1045 of file entities.php.

_elgg_invalidate_cache_for_entity ( guid  ) 

Invalidate this class's entry in the cache.

Parameters:
int $guid The entity guid
Returns:
void private

Definition at line 36 of file entities.php.

_elgg_populate_subtype_cache (  ) 

Fetch all suptypes from DB to local cache.

private

Definition at line 208 of file entities.php.

_elgg_retrieve_cached_entity ( guid  ) 

Retrieve a entity from the cache.

Parameters:
int $guid The guid
Returns:
ElggEntity|bool false if entity not cached, or not fully loaded
See also:
_elgg_cache_entity()
_elgg_invalidate_cache_for_entity() private

Definition at line 95 of file entities.php.

_elgg_retrieve_cached_subtype ( type,
subtype 
)

Retrieve subtype from the cache.

Parameters:
string $type
string $subtype
Returns:
stdClass|null

private

Definition at line 188 of file entities.php.

add_subtype ( type,
subtype,
class = "" 
)

Register ElggEntities with a certain type and subtype to be loaded as a specific class.

By default entities are loaded as one of the 4 parent objects: site, user, object, or group. If you subclass any of these you can register the classname with add_subtype() so it will be loaded as that class automatically when retrieved from the database with get_entity().

Warning:
This function cannot be used to change the class for a type-subtype pair. Use update_subtype() for that.
Parameters:
string $type The type you're subtyping (site, user, object, or group)
string $subtype The subtype
string $class Optional class name for the object
Returns:
int http://docs.elgg.org/DataModel/Entities update_subtype() remove_subtype() get_entity()

Definition at line 300 of file entities.php.

can_edit_entity ( entity_guid,
user_guid = 0 
)

Returns if $user_guid is able to edit $entity_guid.

Can be overridden by by registering for the permissions_check plugin hook.

Warning:
If a $user_guid is not passed it will default to the logged in user.

Use ElggEntity::canEdit() instead.

Parameters:
int $entity_guid The GUID of the entity
int $user_guid The GUID of the user
Returns:
bool http://docs.elgg.org/Entities/AccessControl

Definition at line 2019 of file entities.php.

can_edit_entity_metadata ( entity_guid,
user_guid = 0,
metadata = null 
)

Returns if $user_guid can edit the metadata on $entity_guid.

Can be overridden by by registering for the permissions_check:metadata plugin hook.

Warning:
If a $user_guid isn't specified, the currently logged in user is used.
Parameters:
int $entity_guid The GUID of the entity
int $user_guid The GUID of the user
ElggMetadata $metadata The metadata to specifically check (if any; default null)
Returns:
bool
See also:
elgg_register_plugin_hook_handler()

Definition at line 2067 of file entities.php.

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.

An entity can be a container for any other entity by setting the container_guid. container_guid can differ from owner_guid.

A plugin hook container_permissions_check:$entity_type is emitted to allow granular access controls in plugins.

Parameters:
int $user_guid The user guid, or 0 for logged in user
int $container_guid The container, or 0 for the current page owner.
string $type The type of entity we're looking to write
string $subtype The subtype of the entity we're looking to write
Returns:
bool http://docs.elgg.org/DataModel/Containers

Definition at line 480 of file entities.php.

create_entity ( type,
subtype,
owner_guid,
access_id,
site_guid = 0,
container_guid = 0 
)

Create a new entry in the entities table.

Saves the base information in the entities table for the entity. Saving the type information is handled in the calling class method.

Warning:
Plugin authors should never call this directly. Always use entity objects.
Entities must have an entry in both the entities table and their type table or they will throw an exception when loaded.
Parameters:
string $type The type of the entity (site, user, object, group).
string $subtype The subtype of the entity.
int $owner_guid The GUID of the object's owner.
int $access_id The access control group to create the entity with.
int $site_guid The site to add this entity to. 0 for current.
int $container_guid The container GUID
Returns:
int|false The new entity's GUID, or false on failure
Exceptions:
InvalidParameterException private

Definition at line 551 of file entities.php.

delete_entity ( guid,
recursive = true 
)

Delete an entity.

Removes an entity and its metadata, annotations, relationships, river entries, and private data.

Optionally can remove entities contained and owned by $guid.

Use ElggEntity::delete() instead.

Warning:
If deleting recursively, this bypasses ownership of items contained by the entity. That means that if the container_guid = $guid, the item will be deleted regardless of who owns it.
Parameters:
int $guid The guid of the entity to delete
bool $recursive If true (default) then all entities which are owned or contained by $guid will also be deleted.
Returns:
bool private

Definition at line 1694 of file entities.php.

disable_entity ( guid,
reason = "",
recursive = true 
)

Disable an entity.

Disabled entities do not show up in list or elgg_get_entity() calls, but still exist in the database.

Entities are disabled by setting disabled = yes in the entities table.

You can ignore the disabled field by using access_show_hidden_entities().

Note:
Use ElggEntity::disable() instead.
Parameters:
int $guid The guid
string $reason Optional reason
bool $recursive Recursively disable all entities owned or contained by $guid?
Returns:
bool
See also:
access_show_hidden_entities() private

Definition at line 1569 of file entities.php.

elgg_entity_exists ( guid  ) 

Does an entity exist?

This function checks for the existence of an entity independent of access permissions. It is useful for situations when a user cannot access an entity and it must be determined whether entity has been deleted or the access level has changed.

Parameters:
int $guid The GUID of the entity
Returns:
bool
Since:
1.8.0

Definition at line 778 of file entities.php.

elgg_get_entities ( array $  options = array()  ) 

Returns an array of entities with optional filtering.

Entities are the basic unit of storage in Elgg. This function provides the simplest way to get an array of entities. There are many options available that can be passed to filter what sorts of entities are returned.

To output formatted strings of entities, use elgg_list_entities() and its cousins.

Plural arguments can be written as singular if only specifying a single element. ('type' => 'object' vs 'types' => array('object')).

Parameters:
array $options Array in format:

types => NULL|STR entity type (type IN ('type1', 'type2') Joined with subtypes by AND. See below)

subtypes => NULL|STR entity subtype (SQL: subtype IN ('subtype1', 'subtype2)) Use ELGG_ENTITIES_NO_VALUE for no subtype.

type_subtype_pairs => NULL|ARR (array('type' => 'subtype')) (type = '$type' AND subtype = '$subtype') pairs

guids => NULL|ARR Array of entity guids

owner_guids => NULL|ARR Array of owner guids

container_guids => NULL|ARR Array of container_guids

site_guids => NULL (current_site)|ARR Array of site_guid

order_by => NULL (time_created desc)|STR SQL order by clause

reverse_order_by => BOOL Reverse the default order by clause

limit => NULL (10)|INT SQL limit clause (0 means no limit)

offset => NULL (0)|INT SQL offset clause

created_time_lower => NULL|INT Created time lower boundary in epoch time

created_time_upper => NULL|INT Created time upper boundary in epoch time

modified_time_lower => NULL|INT Modified time lower boundary in epoch time

modified_time_upper => NULL|INT Modified time upper boundary in epoch time

count => TRUE|FALSE return a count instead of entities

wheres => array() Additional where clauses to AND together

joins => array() Additional joins

callback => string A callback function to pass each row through

Returns:
mixed If count, int. If not count, array. false on errors.
Since:
1.7.0
See also:
elgg_get_entities_from_metadata()
elgg_get_entities_from_relationship()
elgg_get_entities_from_access_id()
elgg_get_entities_from_annotations()
elgg_list_entities() http://docs.elgg.org/DataModel/Entities/Getters

Definition at line 858 of file entities.php.

elgg_get_entity_time_where_sql ( table,
time_created_upper = NULL,
time_created_lower = NULL,
time_updated_upper = NULL,
time_updated_lower = NULL 
)

Returns SQL where clause for entity time limits.

Parameters:
string $table Entity table prefix as defined in SELECT...FROM entities $table
NULL|int $time_created_upper Time created upper limit
NULL|int $time_created_lower Time created lower limit
NULL|int $time_updated_upper Time updated upper limit
NULL|int $time_updated_lower Time updated lower limit
Returns:
FALSE|string FALSE on fail, string on success.
Since:
1.7.0 private

Definition at line 1358 of file entities.php.

elgg_get_entity_type_subtype_where_sql ( table,
types,
subtypes,
pairs 
)

Returns SQL where clause for type and subtype on main entity table.

Parameters:
string $table Entity table prefix as defined in SELECT...FROM entities $table
NULL|array $types Array of types or NULL if none.
NULL|array $subtypes Array of subtypes or NULL if none
NULL|array $pairs Array of pairs of types and subtypes
Returns:
FALSE|string
Since:
1.7.0 private

Definition at line 1140 of file entities.php.

elgg_get_guid_based_where_sql ( column,
guids 
)

Returns SQL where clause for owner and containers.

Parameters:
string $column Column name the guids should be checked against. Usually best to provide in table.column format.
NULL|array $guids Array of GUIDs.
Returns:
false|string
Since:
1.8.0 private

Definition at line 1309 of file entities.php.

elgg_instanceof ( entity,
type = NULL,
subtype = NULL,
class = NULL 
)

Checks if $entity is an ElggEntity and optionally for type and subtype.

Use this function in actions and views to check that you are dealing with the correct type of entity.

Parameters:
mixed $entity Entity
string $type Entity type
string $subtype Entity subtype
string $class Class name
Returns:
bool
Since:
1.8.0

Definition at line 2409 of file entities.php.

elgg_list_entities ( array $  options = array(),
getter = 'elgg_get_entities',
viewer = 'elgg_view_entity_list' 
)

Returns a string of parsed entities.

Displays list of entities with formatting specified by the entity view.

Pagination is handled automatically.

Definition at line 1413 of file entities.php.

elgg_list_registered_entities ( array $  options = array()  ) 

Returns a viewable list of entities based on the registered types.

See also:
elgg_view_entity_list
Parameters:
array $options Any elgg_get_entity() options plus:

full_view => BOOL Display full view entities

list_type_toggle => BOOL Display gallery / list switch

allowed_types => TRUE|ARRAY True to show all types or an array of valid types.

pagination => BOOL Display pagination links

Returns:
string A viewable list of entities
Since:
1.7.0

Definition at line 2343 of file entities.php.

elgg_register_entity_type ( type,
subtype = null 
)

Registers an entity type and subtype as a public-facing entity that should be shown in search and by elgg_list_registered_entities().

Warning:
Entities that aren't registered here will not show up in search.

Add a language string item:type:subtype to make sure the items are display properly.

Parameters:
string $type The type of entity (object, site, user, group)
string $subtype The subtype to register (may be blank)
Returns:
bool Depending on success
See also:
get_registered_entity_types() http://docs.elgg.org/Tutorials/Search

Definition at line 2184 of file entities.php.

elgg_register_entity_url_handler ( entity_type,
entity_subtype,
function_name 
)

Sets the URL handler for a particular entity type and subtype.

Parameters:
string $entity_type The entity type
string $entity_subtype The entity subtype
string $function_name The function to register
Returns:
bool Depending on success
See also:
get_entity_url()
ElggEntity::getURL()
Since:
1.8.0

Definition at line 2148 of file entities.php.

enable_entity ( guid,
recursive = true 
)

Enable an entity.

Warning:
In order to enable an entity, you must first use access_show_hidden_entities().
Parameters:
int $guid GUID of entity to enable
bool $recursive Recursively enable all entities disabled with the entity?
Returns:
bool

Definition at line 1630 of file entities.php.

entities_gc (  ) 

Garbage collect stub and fragments from any broken delete/create calls.

Returns:
void gc system private

Definition at line 2470 of file entities.php.

entities_init (  ) 

Entities init function; establishes the default entity page handler.

Returns:
void init system private

Definition at line 2505 of file entities.php.

entities_page_handler ( page  ) 

Page handler for generic entities view system.

Parameters:
array $page Page elements from pain page handler
Returns:
bool view private

Definition at line 2315 of file entities.php.

entities_test ( hook,
type,
value,
params 
)

Runs unit tests for the entity objects.

Parameters:
string $hook unit_test
string $type system
mixed $value Array of tests
mixed $params Params
Returns:
array private

Definition at line 2492 of file entities.php.

entity_row_to_elggstar ( row  ) 

Create an Elgg* object from a given entity row.

Handles loading all tables into the correct class.

Parameters:
stdClass $row The row of the entry in the entities table.
Returns:
ElggEntity|false get_entity_as_row() add_subtype() get_entity() private ClassException|InstallationException

Definition at line 634 of file entities.php.

export_entity_plugin_hook ( hook,
entity_type,
returnvalue,
params 
)

Exports all attributes of an entity.

Warning:
Only exports fields in the entity and entity type tables.
Parameters:
string $hook export
string $entity_type all
mixed $returnvalue Previous hook return value
array $params Parameters

export all

Returns:
mixed private
Exceptions:
InvalidParameterException|InvalidClassException 

Definition at line 1858 of file entities.php.

get_entity ( guid  ) 

Loads and returns an entity object from a guid.

Parameters:
int $guid The GUID of the entity
Returns:
ElggEntity The correct Elgg or custom object based upon entity type and subtype http://docs.elgg.org/DataModel/Entities

Definition at line 709 of file entities.php.

get_entity_as_row ( guid  ) 

Returns a database row from the entities table.

Use get_entity() to return the fully loaded entity.

Warning:
This will only return results if a) it exists, b) you have access to it. see get_access_sql_suffix().
Parameters:
int $guid The GUID of the object to extract
Returns:
stdClass|false entity_row_to_elggstar() private

Definition at line 605 of file entities.php.

get_entity_dates ( type = '',
subtype = '',
container_guid = 0,
site_guid = 0,
order_by = 'time_created' 
)

Returns a list of months in which entities were updated or created.

Use this to generate a list of archives by month for when entities were added or updated.

Warning:
Months are returned in the form YYYYMM.
Parameters:
string $type The type of entity
string $subtype The subtype of entity
int $container_guid The container GUID that the entities belong to
int $site_guid The site GUID
string $order_by Order_by SQL order by clause
Returns:
array|false Either an array months as YYYYMM, or false on failure

Definition at line 1462 of file entities.php.

get_entity_url ( entity_guid  ) 

Returns the URL for an entity.

Can be overridden with register_entity_url_handler().

Parameters:
int $entity_guid The GUID of the entity
Returns:
string The URL of the entity
See also:
register_entity_url_handler()

Definition at line 2103 of file entities.php.

get_registered_entity_types ( type = null  ) 

Returns registered entity types and subtypes.

Parameters:
string $type The type of entity (object, site, user, group) or blank for all
Returns:
array|false Depending on whether entities have been registered
See also:
elgg_register_entity_type()

Definition at line 2257 of file entities.php.

get_subtype_class ( type,
subtype 
)

Return the class name for a registered type and subtype.

Entities can be registered to always be loaded as a certain class with add_subtype() or update_subtype(). This function returns the class name if found and NULL if not.

Parameters:
string $type The type
string $subtype The subtype
Returns:
string|null a class name or null
See also:
get_subtype_from_id()
get_subtype_class_from_id() private

Definition at line 234 of file entities.php.

get_subtype_class_from_id ( subtype_id  ) 

Returns the class name for a subtype id.

Parameters:
int $subtype_id The subtype id
Returns:
string|null
See also:
get_subtype_class()
get_subtype_from_id() private

Definition at line 260 of file entities.php.

get_subtype_from_id ( subtype_id  ) 

Return string name for a given subtype ID.

Parameters:
int $subtype_id Subtype ID
Returns:
string|false Subtype name, false if subtype not found get_subtype_from_id() private

Definition at line 161 of file entities.php.

get_subtype_id ( type,
subtype 
)

Return the id for a given subtype.

ElggEntity objects have a type and a subtype. Subtypes are defined upon creation and cannot be changed.

Plugin authors generally don't need to use this function unless writing their own SQL queries. Use ElggEntity::getSubtype() to return the string subtype.

Warning:
ElggEntity::subtype returns the ID. You probably want ElggEntity::getSubtype() instead!

Definition at line 131 of file entities.php.

import_entity_plugin_hook ( hook,
entity_type,
returnvalue,
params 
)

Import an entity.

This function checks the passed XML doc (as array) to see if it is a user, if so it constructs a new elgg user and returns "true" to inform the importer that it's been handled.

Parameters:
string $hook import
string $entity_type all
mixed $returnvalue Value from previous hook
mixed $params Array of params
Returns:
mixed import all
Exceptions:
ImportException 

Definition at line 1975 of file entities.php.

is_registered_entity_type ( type,
subtype = null 
)

Returns if the entity type and subtype have been registered with {.

See also:
elgg_register_entity_type()}.
Parameters:
string $type The type of entity (object, site, user, group)
string $subtype The subtype (may be blank)
Returns:
bool Depending on whether or not the type has been registered

Definition at line 2285 of file entities.php.

oddentity_to_elggentity ( ODDEntity element  ) 

Utility function used by import_entity_plugin_hook() to process an ODDEntity into an unsaved ElggEntity.

Parameters:
ODDEntity $element The OpenDD element
Returns:
ElggEntity the unsaved entity which should be populated by items.
Exceptions:
ClassException|InstallationException|ImportException 

Definition at line 1902 of file entities.php.

remove_subtype ( type,
subtype 
)

Removes a registered ElggEntity type, subtype, and classname.

Warning:
You do not want to use this function. If you want to unregister a class for a subtype, use update_subtype(). Using this function will permanently orphan all the objects created with the specified subtype.
Parameters:
string $type Type
string $subtype Subtype
Returns:
bool
See also:
add_subtype()
update_subtype()

Definition at line 346 of file entities.php.

unregister_entity_type ( type,
subtype 
)

Unregisters an entity type and subtype as a public-facing entity.

Warning:
With a blank subtype, it unregisters that entity type including all subtypes. This must be called after all subtypes have been registered.
Parameters:
string $type The type of entity (object, site, user, group)
string $subtype The subtype to register (may be blank)
Returns:
bool Depending on success
See also:
elgg_register_entity_type()

Definition at line 2219 of file entities.php.

update_entity ( guid,
owner_guid,
access_id,
container_guid = null,
time_created = null 
)

Update an entity in the database.

There are 4 basic entity types: site, user, object, and group. All entities are split between two tables: the entities table and their type table.

Warning:
Plugin authors should never call this directly. Use ->save() instead.
Parameters:
int $guid The guid of the entity to update
int $owner_guid The new owner guid
int $access_id The new access id
int $container_guid The new container guid
int $time_created The time creation timestamp
Returns:
bool private

Definition at line 413 of file entities.php.

update_entity_last_action ( guid,
posted = NULL 
)

Update the last_action column in the entities table for $guid.

Warning:
This is different to time_updated. Time_updated is automatically set, while last_action is only set when explicitly called.
Parameters:
int $guid Entity annotation|relationship action carried out on
int $posted Timestamp of last action
Returns:
bool private

Definition at line 2440 of file entities.php.

update_subtype ( type,
subtype,
class = '' 
)

Update a registered ElggEntity type, subtype, and class name.

Parameters:
string $type Type
string $subtype Subtype
string $class Class name to use when loading this entity
Returns:
bool

Definition at line 365 of file entities.php.

volatile_data_export_plugin_hook ( hook,
entity_type,
returnvalue,
params 
)

Exports attributes generated on the fly (volatile) about an entity.

Parameters:
string $hook volatile
string $entity_type metadata
string $returnvalue Return value from previous hook
array $params The parameters, passed 'guid' and 'varname'
Returns:
ElggMetadata|null volatile metadata

Definition at line 1816 of file entities.php.


Variable Documentation

$ENTITY_CACHE = array()

Cache entities in memory once loaded.

array $ENTITY_CACHE private

Definition at line 16 of file entities.php.

$SUBTYPE_CACHE = null

Cache subtypes and related class names.

array|null $SUBTYPE_CACHE array once populated from DB, initially null private

Definition at line 25 of file entities.php.

 All Classes Namespaces Files Functions Variables Enumerations
Generated on Sun May 19 00:01:12 2013 for Elgg by  doxygen 1.6.3