Elgg  Version 1.11
Functions
deprecated-1.7.php File Reference

Go to the source code of this file.

Functions

 get_entities_from_access_id ($collection_id, $entity_type="", $entity_subtype="", $owner_guid=0, $limit=10, $offset=0, $order_by="", $site_guid=0, $count=false)
 Get entities with the specified access collection id. More...
 
 get_entities_from_access_collection ($collection_id, $entity_type="", $entity_subtype="", $owner_guid=0, $limit=10, $offset=0, $order_by="", $site_guid=0, $count=false)
 
 get_entities_from_annotations ($entity_type="", $entity_subtype="", $name="", $value="", $owner_guid=0, $group_guid=0, $limit=10, $offset=0, $order_by="asc", $count=false, $timelower=0, $timeupper=0)
 Get entities from annotations. More...
 
 list_entities_from_annotations ($entity_type="", $entity_subtype="", $name="", $value="", $limit=10, $owner_guid=0, $group_guid=0, $asc=false, $fullview=true, $listtypetoggle=false)
 Lists entities. More...
 
 get_library_files ($directory, $exceptions=array(), $list=array())
 Returns all php files in a directory. More...
 
 elgg_validate_action_url ($url)
 Add action tokens to URL. More...
 
 test_ip ()
 Does nothing. More...
 
 is_ip_in_array ()
 Does nothing. More...
 
 get_entities ($type="", $subtype="", $owner_guid=0, $order_by="", $limit=10, $offset=0, $count=false, $site_guid=0, $container_guid=null, $timelower=0, $timeupper=0)
 Returns entities. More...
 
 delete_entities ($type="", $subtype="", $owner_guid=0)
 Delete multiple entities that match a given query. More...
 
 list_registered_entities ($owner_guid=0, $limit=10, $fullview=true, $listtypetoggle=false, $allowedtypes=true)
 Lists entities. More...
 
 list_entities ($type="", $subtype="", $owner_guid=0, $limit=10, $fullview=true, $listtypetoggle=false, $pagination=true)
 Lists entities. More...
 
 search_for_group ($criteria, $limit=10, $offset=0, $order_by="", $count=false)
 Searches for a group based on a complete or partial name or description. More...
 
 search_list_groups_by_name ($hook, $user, $returnvalue, $tag)
 Returns a formatted list of groups suitable for injecting into search. More...
 
 list_group_search ($tag, $limit=10)
 Displays a list of group objects that have been searched for. More...
 
 get_entities_from_metadata ($meta_name, $meta_value="", $entity_type="", $entity_subtype="", $owner_guid=0, $limit=10, $offset=0, $order_by="", $site_guid=0, $count=FALSE, $case_sensitive=TRUE)
 Return a list of entities based on the given search criteria. More...
 
 get_entities_from_metadata_multi ($meta_array, $entity_type="", $entity_subtype="", $owner_guid=0, $limit=10, $offset=0, $order_by="", $site_guid=0, $count=false, $meta_array_operator= 'and')
 Return entities from metadata. More...
 
 menu_item ($menu_name, $menu_url)
 Returns a menu item for use in the children section of add_menu() This is not currently used in the Elgg core. More...
 
 search_for_object ($criteria, $limit=10, $offset=0, $order_by="", $count=false)
 Searches for an object based on a complete or partial title or description using full text searching. More...
 
 search_list_objects_by_name ($hook, $user, $returnvalue, $tag)
 Returns a formatted list of objects suitable for injecting into search. More...
 
 get_entities_from_relationship ($relationship, $relationship_guid, $inverse_relationship=false, $type="", $subtype="", $owner_guid=0, $order_by="", $limit=10, $offset=0, $count=false, $site_guid=0)
 Return entities from relationships. More...
 
 search_for_site ($criteria, $limit=10, $offset=0, $order_by="", $count=false)
 Searches for a site based on a complete or partial name or description or url using full text searching. More...
 
 search_for_user ($criteria, $limit=10, $offset=0, $order_by="", $count=false)
 Searches for a user based on a complete or partial name or username. More...
 
 list_user_search ($tag, $limit=10)
 Displays a list of user objects that have been searched for. More...
 
 search_list_users_by_name ($hook, $user, $returnvalue, $tag)
 Returns a formatted list of users suitable for injecting into search. More...
 
 extend_view ($view, $view_name, $priority=501, $viewtype= '')
 Extend a view. More...
 
 get_views ($dir, $base)
 Get views in a dir. More...
 
 make_register_object ($register_name, $register_value, $children_array=array())
 Constructs and returns a register object. More...
 
 delete_object_entity ($guid)
 THIS FUNCTION IS DEPRECATED. More...
 
 delete_user_entity ($guid)
 THIS FUNCTION IS DEPRECATED. More...
 

Function Documentation

delete_entities (   $type = "",
  $subtype = "",
  $owner_guid = 0 
)

Delete multiple entities that match a given query.

This function iterates through and calls delete_entity on each one, this is somewhat inefficient but lets the 'delete' event be called for each entity.

Parameters
string$typeThe type of entity (eg "user", "object" etc)
string$subtypeThe arbitrary subtype of the entity
int$owner_guidThe GUID of the owning user
Returns
false

Definition at line 396 of file deprecated-1.7.php.

delete_object_entity (   $guid)

THIS FUNCTION IS DEPRECATED.

Delete a object's extra data.

Parameters
int$guidGUID
Returns
1

Definition at line 1141 of file deprecated-1.7.php.

delete_user_entity (   $guid)

THIS FUNCTION IS DEPRECATED.

Delete a user's extra data.

Parameters
int$guidUser GUID
Returns
1

Definition at line 1159 of file deprecated-1.7.php.

elgg_validate_action_url (   $url)

Add action tokens to URL.

Parameters
string$urlURL
Returns
string

Definition at line 258 of file deprecated-1.7.php.

extend_view (   $view,
  $view_name,
  $priority = 501,
  $viewtype = '' 
)

Extend a view.

Parameters
string$viewThe view to extend.
string$view_nameThis view is added to $view
int$priorityThe priority, from 0 to 1000, to add at (lowest numbers displayed first)
string$viewtypeNot used
Returns
void

Definition at line 1085 of file deprecated-1.7.php.

get_entities (   $type = "",
  $subtype = "",
  $owner_guid = 0,
  $order_by = "",
  $limit = 10,
  $offset = 0,
  $count = false,
  $site_guid = 0,
  $container_guid = null,
  $timelower = 0,
  $timeupper = 0 
)

Returns entities.

Parameters
string$typeEntity type
string$subtypeEntity subtype
int$owner_guidOwner GUID
string$order_byOrder by clause
int$limitLimit
int$offsetOffset
bool$countReturn a count or an array of entities
int$site_guidSite GUID
int$container_guidContainer GUID
int$timelowerLower time limit
int$timeupperUpper time limit
Returns
array

Definition at line 308 of file deprecated-1.7.php.

get_entities_from_access_collection (   $collection_id,
  $entity_type = "",
  $entity_subtype = "",
  $owner_guid = 0,
  $limit = 10,
  $offset = 0,
  $order_by = "",
  $site_guid = 0,
  $count = false 
)

Definition at line 70 of file deprecated-1.7.php.

get_entities_from_access_id (   $collection_id,
  $entity_type = "",
  $entity_subtype = "",
  $owner_guid = 0,
  $limit = 10,
  $offset = 0,
  $order_by = "",
  $site_guid = 0,
  $count = false 
)

Get entities with the specified access collection id.

Parameters
int$collection_idID of collection
string$entity_typeType of entities
string$entity_subtypeSubtype of entities
int$owner_guidGuid of owner
int$limitLimit of number of entities to return
int$offsetSkip this many entities
string$order_byColumn to order by
int$site_guidThe site guid
bool$countReturn a count or entities
Returns
array

Definition at line 19 of file deprecated-1.7.php.

get_entities_from_annotations (   $entity_type = "",
  $entity_subtype = "",
  $name = "",
  $value = "",
  $owner_guid = 0,
  $group_guid = 0,
  $limit = 10,
  $offset = 0,
  $order_by = "asc",
  $count = false,
  $timelower = 0,
  $timeupper = 0 
)

Get entities from annotations.

No longer used.

Parameters
mixed$entity_typeType of entity
mixed$entity_subtypeSubtype of entity
string$nameName of annotation
string$valueValue of annotation
int$owner_guidGuid of owner of annotation
int$group_guidGuid of group
int$limitLimit
int$offsetOffset
string$order_bySQL order by string
bool$countCount or return entities
int$timelowerLower time limit
int$timeupperUpper time limit
Returns
ElggEntity[]|int

Definition at line 101 of file deprecated-1.7.php.

get_entities_from_metadata (   $meta_name,
  $meta_value = "",
  $entity_type = "",
  $entity_subtype = "",
  $owner_guid = 0,
  $limit = 10,
  $offset = 0,
  $order_by = "",
  $site_guid = 0,
  $count = FALSE,
  $case_sensitive = TRUE 
)

Return a list of entities based on the given search criteria.

Parameters
mixed$meta_nameMetadat name
mixed$meta_valueMetadata value
string$entity_typeThe type of entity to look for, eg 'site' or 'object'
string$entity_subtypeThe subtype of the entity.
int$owner_guidOwner GUID
int$limitLimit
int$offsetOffset
string$order_byOptional ordering.
int$site_guidSite GUID. 0 for current, -1 for any.
bool$countReturn a count instead of entities
bool$case_sensitiveMetadata names case sensitivity
Returns
int|array A list of entities, or a count if $count is set to true

Definition at line 616 of file deprecated-1.7.php.

get_entities_from_metadata_multi (   $meta_array,
  $entity_type = "",
  $entity_subtype = "",
  $owner_guid = 0,
  $limit = 10,
  $offset = 0,
  $order_by = "",
  $site_guid = 0,
  $count = false,
  $meta_array_operator = 'and' 
)

Return entities from metadata.

Parameters
mixed$meta_arrayMetadata name
string$entity_typeThe type of entity to look for, eg 'site' or 'object'
string$entity_subtypeThe subtype of the entity.
int$owner_guidOwner GUID
int$limitLimit
int$offsetOffset
string$order_byOptional ordering.
int$site_guidSite GUID. 0 for current, -1 for any.
bool$countReturn a count instead of entities
bool$meta_array_operatorOperator for metadata values
Returns
int|array A list of entities, or a count if $count is set to true

Definition at line 690 of file deprecated-1.7.php.

get_entities_from_relationship (   $relationship,
  $relationship_guid,
  $inverse_relationship = false,
  $type = "",
  $subtype = "",
  $owner_guid = 0,
  $order_by = "",
  $limit = 10,
  $offset = 0,
  $count = false,
  $site_guid = 0 
)

Return entities from relationships.

Parameters
string$relationshipThe relationship type
int$relationship_guidThe GUID of the relationship owner
bool$inverse_relationshipInvert relationship?
string$typeEntity type
string$subtypeEntity subtype
int$owner_guidEntity owner GUID
string$order_byOrder by clause
int$limitLimit
int$offsetOffset
bool$countReturn a count instead of entities?
int$site_guidSite GUID
Returns
mixed

Definition at line 868 of file deprecated-1.7.php.

get_library_files (   $directory,
  $exceptions = array(),
  $list = array() 
)

Returns all php files in a directory.

Parameters
string$directoryDirectory to look in
array$exceptionsArray of extensions (with .!) to ignore
array$listA list files to include in the return
Returns
array

Definition at line 244 of file deprecated-1.7.php.

get_views (   $dir,
  $base 
)

Get views in a dir.

Parameters
string$dirDir
string$baseBase view
Returns
array

Definition at line 1100 of file deprecated-1.7.php.

is_ip_in_array ( )

Does nothing.

Returns
bool

Definition at line 283 of file deprecated-1.7.php.

list_entities (   $type = "",
  $subtype = "",
  $owner_guid = 0,
  $limit = 10,
  $fullview = true,
  $listtypetoggle = false,
  $pagination = true 
)

Lists entities.

Parameters
string$typeEntity type
string$subtypeEntity subtype
int$owner_guidOwner GUID
int$limitLimit
bool$fullviewDisplay entity full views?
bool$listtypetoggleAllow switching to gallery mode?
bool$paginationShow pagination?
Returns
string

Definition at line 457 of file deprecated-1.7.php.

list_entities_from_annotations (   $entity_type = "",
  $entity_subtype = "",
  $name = "",
  $value = "",
  $limit = 10,
  $owner_guid = 0,
  $group_guid = 0,
  $asc = false,
  $fullview = true,
  $listtypetoggle = false 
)

Lists entities.

See also
elgg_view_entity_list
Parameters
string$entity_typeType of entity.
string$entity_subtypeSubtype of entity.
string$nameName of annotation.
string$valueValue of annotation.
int$limitMaximum number of results to return.
int$owner_guidOwner.
int$group_guidGroup container. Currently only supported if entity_type is object
boolean$ascWhether to list in ascending or descending order (default: desc)
boolean$fullviewWhether to display the entities in full
boolean$listtypetoggleCan 'gallery' view can be displayed (default: no)
Returns
string Formatted entity list

Definition at line 181 of file deprecated-1.7.php.

list_group_search (   $tag,
  $limit = 10 
)

Displays a list of group objects that have been searched for.

See also
elgg_view_entity_list
Parameters
string$tagSearch criteria
int$limitThe number of entities to display on a page
Returns
string The list in a form suitable to display

Definition at line 586 of file deprecated-1.7.php.

list_registered_entities (   $owner_guid = 0,
  $limit = 10,
  $fullview = true,
  $listtypetoggle = false,
  $allowedtypes = true 
)

Lists entities.

Parameters
int$owner_guidOwner GUID
int$limitLimit
bool$fullviewShow entity full views
bool$listtypetoggleShow list type toggle
bool$allowedtypesA string of the allowed types
Returns
string

Definition at line 413 of file deprecated-1.7.php.

list_user_search (   $tag,
  $limit = 10 
)

Displays a list of user objects that have been searched for.

See also
elgg_view_entity_list
Parameters
string$tagSearch criteria
int$limitThe number of entities to display on a page
Returns
string The list in a form suitable to display

Definition at line 1026 of file deprecated-1.7.php.

make_register_object (   $register_name,
  $register_value,
  $children_array = array() 
)

Constructs and returns a register object.

Parameters
string$register_nameThe name of the register
mixed$register_valueThe value of the register
array$children_arrayOptionally, an array of children
Returns
false| Depending on success

Definition at line 1115 of file deprecated-1.7.php.

menu_item (   $menu_name,
  $menu_url 
)

Returns a menu item for use in the children section of add_menu() This is not currently used in the Elgg core.

Parameters
string$menu_nameThe name of the menu item
string$menu_urlIts URL
Returns
|false Depending on success

Definition at line 755 of file deprecated-1.7.php.

search_for_group (   $criteria,
  $limit = 10,
  $offset = 0,
  $order_by = "",
  $count = false 
)

Searches for a group based on a complete or partial name or description.

Parameters
string$criteriaThe partial or full name or description
int$limitLimit of the search.
int$offsetOffset.
string$order_byThe order.
boolean$countWhether to return the count of results or just the results.
Returns
mixed

Definition at line 504 of file deprecated-1.7.php.

search_for_object (   $criteria,
  $limit = 10,
  $offset = 0,
  $order_by = "",
  $count = false 
)

Searches for an object based on a complete or partial title or description using full text searching.

IMPORTANT NOTE: With MySQL's default setup: 1) $criteria must be 4 or more characters long 2) If $criteria matches greater than 50% of results NO RESULTS ARE RETURNED!

Parameters
string$criteriaThe partial or full name or username.
int$limitLimit of the search.
int$offsetOffset.
string$order_byThe order.
boolean$countWhether to return the count of results or just the results.
Returns
int|false

Definition at line 777 of file deprecated-1.7.php.

search_for_site (   $criteria,
  $limit = 10,
  $offset = 0,
  $order_by = "",
  $count = false 
)

Searches for a site based on a complete or partial name or description or url using full text searching.

IMPORTANT NOTE: With MySQL's default setup: 1) $criteria must be 4 or more characters long 2) If $criteria matches greater than 50% of results NO RESULTS ARE RETURNED!

Parameters
string$criteriaThe partial or full name or username.
int$limitLimit of the search.
int$offsetOffset.
string$order_byThe order.
boolean$countWhether to return the count of results or just the results.
Returns
mixed

Definition at line 930 of file deprecated-1.7.php.

search_for_user (   $criteria,
  $limit = 10,
  $offset = 0,
  $order_by = "",
  $count = false 
)

Searches for a user based on a complete or partial name or username.

Parameters
string$criteriaThe partial or full name or username.
int$limitLimit of the search.
int$offsetOffset.
string$order_byThe order.
boolean$countWhether to return the count of results or just the results.
Returns
mixed

Definition at line 977 of file deprecated-1.7.php.

search_list_groups_by_name (   $hook,
  $user,
  $returnvalue,
  $tag 
)

Returns a formatted list of groups suitable for injecting into search.

Parameters
string$hookHook name
string$userUser
mixed$returnvaluePrevious hook's return value
string$tagTag to search on
Returns
string

Definition at line 553 of file deprecated-1.7.php.

search_list_objects_by_name (   $hook,
  $user,
  $returnvalue,
  $tag 
)

Returns a formatted list of objects suitable for injecting into search.

Parameters
sting$hookHook
string$useruser
mixed$returnvaluePrevious return value
mixed$tagSearch term
Returns
array

Definition at line 824 of file deprecated-1.7.php.

search_list_users_by_name (   $hook,
  $user,
  $returnvalue,
  $tag 
)

Returns a formatted list of users suitable for injecting into search.

Parameters
string$hookHook name
string$userUser?
mixed$returnvaluePrevious hook's return value
mixed$tagTag to search against
Returns
void

Definition at line 1048 of file deprecated-1.7.php.

test_ip ( )

Does nothing.

Returns
0

Definition at line 271 of file deprecated-1.7.php.