38 if ($entity_subtype) {
39 $options[
'subtype'] = $entity_subtype;
73 elgg_deprecated_notice(
'get_entities_from_access_collection() was deprecated by elgg_get_entities()', 1.7);
103 $count =
false, $timelower = 0, $timeupper = 0) {
104 $msg =
'get_entities_from_annotations() is deprecated by elgg_get_entities_from_annotations().';
113 if ($entity_subtype) {
114 $options[
'subtypes'] = $entity_subtype;
132 $options[
'container_guid'] = $group_guid;
144 $options[
'order_by'] =
"maxtime $order_by";
152 $options[
'annotation_created_time_lower'] = $timelower;
156 $options[
'annotation_created_time_upper'] = $timeupper;
183 $listtypetoggle =
false) {
185 $msg =
'list_entities_from_annotations is deprecated by elgg_list_entities_from_annotations';
194 if ($entity_subtype) {
195 $options[
'subtypes'] = $entity_subtype;
215 $options[
'container_guid'] = $group_guid;
219 $options[
'order_by'] =
'maxtime desc';
227 $options[
'list_type_toggle'] = $listtypetoggle;
324 if (is_array(
$type)) {
363 $options[
'site_guids'] = $site_guid;
371 $options[
'created_time_upper'] = $timeupper;
375 $options[
'created_time_lower'] = $timelower;
414 $listtypetoggle =
false, $allowedtypes =
true) {
416 elgg_deprecated_notice(
'list_registered_entities() was deprecated by elgg_list_registered_entities().', 1.7);
430 $options[
'allowed_types'] = $allowedtypes;
435 $options[
'list_type_toggle'] = $listtypetoggle;
486 $options[
'list_type_toggle'] = $listtypetoggle;
515 if ($order_by ==
"") {
516 $order_by =
"e.time_created desc";
520 $query =
"SELECT count(e.guid) as total ";
522 $query =
"SELECT e.* ";
524 $query .=
"from {$CONFIG->dbprefix}entities e" 525 .
" JOIN {$CONFIG->dbprefix}groups_entity g on e.guid=g.guid where ";
527 $query .=
"(g.name like \"%{$criteria}%\" or g.description like \"%{$criteria}%\")";
528 $query .=
" and $access";
531 $query .=
" order by $order_by limit $offset, $limit";
532 return get_data($query,
"entity_row_to_elggstar");
564 $return =
elgg_view(
'group/search/startblurb', array(
'count' => $countgroups,
'tag' => $tag));
565 foreach ($groups as $group) {
568 $vars = array(
'count' => $countgroups,
'threshold' => $threshold,
'tag' => $tag);
618 $site_guid = 0,
$count = FALSE, $case_sensitive = TRUE) {
620 elgg_deprecated_notice(
'get_entities_from_metadata() was deprecated by elgg_get_entities_from_metadata()!', 1.7);
624 $options[
'metadata_names'] = $meta_name;
627 $options[
'metadata_values'] = $meta_value;
634 if ($entity_subtype) {
635 $options[
'subtypes'] = $entity_subtype;
667 $options[
'metadata_case_sensitive'] = $case_sensitive;
692 $count =
false, $meta_array_operator =
'and') {
694 elgg_deprecated_notice(
'get_entities_from_metadata_multi() was deprecated by elgg_get_entities_from_metadata()!', 1.7);
696 if (!is_array($meta_array) ||
sizeof($meta_array) == 0) {
702 $options[
'metadata_name_value_pairs'] = $meta_array;
708 if ($entity_subtype) {
709 $options[
'subtypes'] = $entity_subtype;
740 $options[
'metadata_name_value_pairs_operator'] = $meta_array_operator;
788 if ($order_by ==
"") {
789 $order_by =
"e.time_created desc";
793 $query =
"SELECT count(e.guid) as total ";
795 $query =
"SELECT e.* ";
797 $query .=
"from {$CONFIG->dbprefix}entities e 798 join {$CONFIG->dbprefix}objects_entity o on e.guid=o.guid 799 where match(o.title,o.description) against ('$criteria') and $access";
802 $query .=
" order by $order_by limit $offset, $limit";
803 return get_data($query,
"entity_row_to_elggstar");
836 $return =
elgg_view(
'user/search/startblurb', array(
'count' => $countusers,
'tag' => $tag));
841 array(
'count' => $countusers,
'threshold' => $threshold,
'tag' => $tag));
872 elgg_deprecated_notice(
'get_entities_from_relationship() was deprecated by elgg_get_entities_from_relationship()!', 1.7);
876 $options[
'relationship'] = $relationship;
877 $options[
'relationship_guid'] = $relationship_guid;
878 $options[
'inverse_relationship'] = $inverse_relationship;
941 if ($order_by ==
"") {
942 $order_by =
"e.time_created desc";
946 $query =
"SELECT count(e.guid) as total ";
948 $query =
"SELECT e.* ";
950 $query .=
"from {$CONFIG->dbprefix}entities e 951 join {$CONFIG->dbprefix}sites_entity s on e.guid=s.guid 952 where match(s.name, s.description, s.url) against ('$criteria') and $access";
955 $query .=
" order by $order_by limit $offset, $limit";
956 return get_data($query,
"entity_row_to_elggstar");
988 if ($order_by ==
"") {
989 $order_by =
"e.time_created desc";
993 $query =
"SELECT count(e.guid) as total ";
995 $query =
"SELECT e.* ";
997 $query .=
"from {$CONFIG->dbprefix}entities e 998 join {$CONFIG->dbprefix}users_entity u on e.guid=u.guid where ";
1000 $query .=
"(u.name like \"%{$criteria}%\" or u.username like \"%{$criteria}%\")";
1001 $query .=
" and $access";
1004 $query .=
" order by $order_by limit $offset, $limit";
1005 return get_data($query,
"entity_row_to_elggstar");
1059 $return =
elgg_view(
'user/search/startblurb', array(
'count' => $countusers,
'tag' => $tag));
1064 $vars = array(
'count' => $countusers,
'threshold' => $threshold,
'tag' => $tag);
1117 if (empty($register_name) || empty($register_value)) {
1121 $register = new \stdClass;
1122 $register->name = $register_name;
1123 $register->value = $register_value;
1124 $register->children = $children_array;
extend_view($view, $view_name, $priority=501, $viewtype= '')
Extend a view.
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...
list_group_search($tag, $limit=10)
Displays a list of group objects that have been searched for.
elgg_add_action_tokens_to_url($url, $html_encode=false)
Adds action tokens to URL.
get_data_row($query, $callback="")
Retrieve a single row from the database.
delete_object_entity($guid)
THIS FUNCTION IS DEPRECATED.
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.
list_user_search($tag, $limit=10)
Displays a list of user objects that have been searched for.
if($guid==elgg_get_logged_in_user_guid()) $name
list_entities($type="", $subtype="", $owner_guid=0, $limit=10, $fullview=true, $listtypetoggle=false, $pagination=true)
Lists entities.
elgg_get_entities_from_annotations(array $options=array())
Returns entities based upon annotations.
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)
search_list_users_by_name($hook, $user, $returnvalue, $tag)
Returns a formatted list of users suitable for injecting into search.
$guid
Removes an admin notice.
search_list_groups_by_name($hook, $user, $returnvalue, $tag)
Returns a formatted list of groups suitable for injecting into search.
elgg_get_views($dir, $base)
Returns the name of views for in a directory.
search_list_objects_by_name($hook, $user, $returnvalue, $tag)
Returns a formatted list of objects suitable for injecting into search.
is_ip_in_array()
Does nothing.
make_register_object($register_name, $register_value, $children_array=array())
Constructs and returns a register object.
elgg_get_file_list($directory, $exceptions=array(), $list=array(), $extensions=null)
Returns a list of files in $directory.
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
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.
sanitise_string($string)
Wrapper function for alternate English spelling (.
elgg_extend_view($view, $view_extension, $priority=501, $viewtype= '')
Extends a view with another view.
get_views($dir, $base)
Get views in a dir.
elgg_get_entities(array $options=array())
Returns an array of entities with optional filtering.
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.
elgg_deprecated_notice($msg, $dep_version, $backtrace_level=1)
Log a notice about deprecated use of a function, view, etc.
elgg global
Pointer to the global context.
delete_user_entity($guid)
THIS FUNCTION IS DEPRECATED.
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.
elgg_view($view, $vars=array(), $bypass=false, $ignored=false, $viewtype= '')
Return a parsed view.
get_library_files($directory, $exceptions=array(), $list=array())
Returns all php files in a directory.
elgg system_message
Wrapper function for system_messages.
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.
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 searchi...
elgg_list_entities(array $options=array(), $getter= 'elgg_get_entities', $viewer= 'elgg_view_entity_list')
Returns a string of rendered entities.
get_data($query, $callback="")
Retrieve rows from the database.
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.
elgg_list_entities_from_annotations($options=array())
Returns a viewable list of entities from annotations.
elgg_validate_action_url($url)
Add action tokens to URL.
elgg_list_registered_entities(array $options=array())
Returns a viewable list of entities based on the registered types.
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.
list_registered_entities($owner_guid=0, $limit=10, $fullview=true, $listtypetoggle=false, $allowedtypes=true)
Lists entities.
elgg_view_entity(\ElggEntity $entity, $vars=array(), $bypass=false, $debug=false)
Returns a string of a rendered entity.
elgg_get_entities_from_access_id(array $options=array())
Return entities based upon access id.
sanitise_int($int, $signed=true)
Sanitizes an integer for database use.
elgg_get_entities_from_relationship($options)
Return entities matching a given query joining against a relationship.
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.
_elgg_get_access_where_sql(array $options=array())
Returns the SQL where clause for enforcing read access to data.
elgg_view_entity_list($entities, $vars=array(), $offset=0, $limit=null, $full_view=true, $list_type_toggle=true, $pagination=true)
Returns a rendered list of entities with pagination.
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 E...
if(file_exists($welcome)) $vars
delete_entities($type="", $subtype="", $owner_guid=0)
Delete multiple entities that match a given query.
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.