95 $href =
"admin/$parent_id/$menu_id";
97 $href =
"admin/$menu_id";
102 $name =
"$parent_id:$name";
109 'context' =>
'admin',
110 'parent_name' => $parent_id,
182 unset(
$options[
'attribute_name_value_pairs']);
183 unset(
$options[
'attribute_name_value_pairs_operator']);
206 return $user->ban($reason);
226 return $user->unban();
246 return $user->makeAdmin();
266 return $user->removeAdmin();
286 return $user->isValidated();
308 $user->setValidationStatus($status, $method);
330 $user->setLastAction();
349 $user->setLastLogin();
365 elgg_deprecated_notice(__FUNCTION__ .
' is deprecated. Use ElggEntity setter or ElggEntity::setMetadata()',
'3.0');
398 $ignored2 = null, $allow_multiple =
false) {
400 __FUNCTION__ .
' is deprecated. 401 Use ElggEntity setter or ElggEntity::setMetadata()',
409 if ($allow_multiple) {
433 elgg_deprecated_notice(__FUNCTION__ .
' is deprecated. Use \ElggEntity->getOwnedAccessCollections() or elgg_get_access_collections()',
'3.0');
499 __FUNCTION__ .
' has been deprecated. 500 elgg_get_entities() now accepts all metadata options. 519 __FUNCTION__ .
' has been deprecated. Use elgg_list_entities(). 562 __FUNCTION__ .
' has been deprecated. 563 elgg_get_entities() now accepts all annotation options 582 __FUNCTION__ .
' has been deprecated. Use elgg_list_entities(). 670 __FUNCTION__ .
' has been deprecated. 671 elgg_get_entities() now accepts all relationship options. 690 __FUNCTION__ .
' has been deprecated. Use elgg_list_entities(). 732 __FUNCTION__ .
' has been deprecated. 733 elgg_get_entities() now accepts all private settings options. 752 __FUNCTION__ .
' has been deprecated. Use elgg_list_entities(). 773 __FUNCTION__ .
' has been deprecated. 774 Use elgg_get_entities() with "access_ids" option. 821 __FUNCTION__ .
' has been deprecated. 822 Use elgg_get_entities() with "annotation_sort_by_calculation" option. 823 To sort in an ascending order, pass "order_by" => new OrderByClause("annotation_calculation", "asc") 845 __FUNCTION__ .
' has been deprecated. 846 Use elgg_list_entities() with "annotation_sort_by_calculation" option. 847 To sort in an ascending order, pass "order_by" => new OrderByClause("annotation_calculation", "asc") 877 __FUNCTION__ .
' has been deprecated. 878 Use ElggAnnotation::enable() 881 if (!in_array(
$type, [
'annotation',
'annotations'])) {
912 __FUNCTION__ .
' has been deprecated. 913 Use elgg_get_metadata_from_id() and elgg_get_annotation_from_id() 921 if (
$type ==
'metadata') {
943 __FUNCTION__ .
' has been deprecated. 944 Use ElggMetadata::delete() and ElggAnnotation::delete() 1004 __FUNCTION__ .
' has been deprecated. 1005 Use ElggAnnotation::save() or ElggEntity::annotate() 1035 __FUNCTION__ .
' has been deprecated. 1036 Use ElggAnnotation::save() or ElggEntity::annotate() 1084 return \Elgg\Project\Paths::sanitize(
$path, $append_slash);
1108 __FUNCTION__ .
' has been deprecated. 1109 Use ElggEntity::getPrivateSetting() 1137 __FUNCTION__ .
' has been deprecated. 1138 Use ElggEntity::getAllPrivateSettings() 1149 return $entity->getAllPrivateSettings();
1168 __FUNCTION__ .
' has been deprecated. 1169 Use ElggEntity::setPrivateSetting() 1198 __FUNCTION__ .
' has been deprecated. 1199 Use ElggEntity::removePrivateSetting() 1227 __FUNCTION__ .
' has been deprecated. 1228 Use ElggEntity::removeAllPrivateSettings() 1239 return $entity->removeAllPrivateSettings();
1254 __FUNCTION__ .
' has been deprecated. 1255 Perform batch operations on members of the batch. 1258 return $object->enable() ?
true :
false;
1273 __FUNCTION__ .
' has been deprecated. 1274 Perform batch operations on members of the batch. 1277 return $object->disable() ?
true :
false;
1309 __FUNCTION__ .
' has been deprecated. 1310 Use elgg_register_route() to register a named route or define it in elgg-plugin.php',
1313 return _elgg_services()->routes->registerPageHandler($identifier, $function);
1329 __FUNCTION__ .
' has been deprecated. 1330 Use new routing API to register and unregister routes.',
1401 if (null === $group_guid) {
1546 return elgg()->translator->reloadAllTranslations();
1575 'full_view' =>
false,
1576 'allowed_types' =>
true,
1577 'list_type_toggle' =>
false,
1578 'pagination' =>
true,
1581 'type_subtype_pairs' => [],
1588 foreach ($types as
$type => $subtype_array) {
1591 if (
$type ==
'object') {
1592 if (is_array($subtype_array) && count($subtype_array)) {
1596 if (is_array($subtype_array) && count($subtype_array)) {
1605 if (!empty(
$options[
'type_subtype_pairs'])) {
1632 preg_match(
'/^([0-9]{10})([\.a-z0-9-_]+)?\.(php)$/i',
$filename, $matches);
1634 if (isset($matches[1])) {
1635 return (
int) $matches[1];
1652 if (!$upgrade_path) {
1657 if (!is_dir($upgrade_path)) {
1660 $handle = opendir($upgrade_path);
1665 $upgrade_files = [];
1667 while (($upgrade_file = readdir($handle)) !==
false) {
1669 if (!is_file($upgrade_path . $upgrade_file)) {
1673 if (!$upgrade_version) {
1676 $upgrade_files[] = $upgrade_file;
1679 sort($upgrade_files);
1681 return $upgrade_files;
1736 $arguments = func_get_args();
1776 return elgg()->group_tools->group($group);
1779 return elgg()->group_tools->all();
register_translations($path, $load_all=false, $language=null)
When given a full path, finds translation files and loads them.
remove_group_tool_option($name)
Removes a group tool option based on name.
if(!$item instanceof ElggRiverItem) $object
if(!$user||!$user->canDelete()) $name
elgg_list_entities_from_access_id(array $options=[])
Lists entities from an access collection.
$params
Saves global plugin settings.
elgg_get_upgrade_files($upgrade_path=null)
Returns a list of upgrade files relative to the $upgrade_path dir.
get_user($guid)
Get a user object from a GUID.
elgg_view_entity_list($entities, array $vars=[])
Returns a rendered list of entities with pagination.
$annotation
Elgg default annotation view.
remove_private_setting($entity_guid, $name)
Deletes a private setting for an entity.
elgg_register_page_handler($identifier, callable $function)
Registers a page handler for a particular identifier.
elgg_get_entities_from_access_id(array $options=[])
Return entities based upon access id.
elgg_get_entities_from_relationship($options)
Return entities matching a given query joining against a relationship.
admin_gatekeeper()
Alias of elgg_admin_gatekeeper()
register_metadata_as_independent($type, $subtype= '*')
Mark entities with a particular type and subtype as having access permissions that can be changed ind...
unset_config($name)
Removes a config setting.
elgg_list_entities_from_annotation_calculation($options)
List entities from an annotation calculation.
elgg_set_user_validation_status($user_guid, $status, $method= '')
Set the validation status for a user.
delete_data($query, array $params=[])
Remove a row from the database.
elgg_get_entity_dates(array $options=[])
Returns a list of months in which entities were updated or created.
unban_user($user_guid)
Unban a user.
elgg_unregister_page_handler($identifier)
Unregister a page handler for an identifier.
get_private_setting($entity_guid, $name)
Gets a private setting for an entity.
update_metadata($id, $name, $value, $value_type)
Update a specific piece of metadata.
elgg_entity_gatekeeper($guid, $type=null, $subtype=null)
Can the viewer see this entity?
elgg_get_entities_from_metadata(array $options=[])
Returns entities based upon metadata.
get_data($query, $callback=null, array $params=[])
Retrieve rows from the database.
elgg_echo($message_key, array $args=[], $language="")
Given a message key, returns an appropriately translated full-text string.
elgg_list_entities(array $options=[], $getter= 'elgg_get_entities', $viewer= 'elgg_view_entity_list')
Returns a string of rendered entities.
insert_data($query, array $params=[])
Insert a row into the database.
update_annotation($annotation_id, $name, $value, $value_type, $owner_guid, $access_id)
Update an annotation.
elgg_save_config($name, $value)
Save a configuration setting.
sanitise_filepath($path, $append_slash=true)
Sanitise file paths ensuring that they begin and end with slashes etc.
get_config($name)
Gets a configuration value.
add_group_tool_option($name, $options=[])
Adds a group tool option.
$user_guid
Validate a user.
get_registered_entity_types($type=null)
Returns registered entity types and subtypes.
elgg_batch_disable_callback($object)
Disable objects with a disable() method.
elgg_gatekeeper()
Used at the top of a page to mark it as logged in users only.
$id
River item delete action.
set_last_action($user)
Sets the last action time of the given user to right now.
elgg_get_annotation_from_id($id)
Elgg annotations Functions to manage object annotations.
elgg_list_entities_from_annotations($options=[])
Returns a viewable list of entities from annotations.
_elgg_delete_metastring_based_object_by_id($id, $type)
Deletes a metastring-based object by its id.
update_data($query, array $params=[], $get_num_rows=false)
Update a row in the database.
elgg_get_entities(array $options=[])
Fetches/counts entities or performs a calculation on their properties.
elgg_set_ignore_access($ignore=true)
Set if Elgg's access system should be ignored.
elgg_get_group_tool_options(\ElggGroup $group=null)
Function to return available group tool options.
elgg_list_registered_entities(array $options=[])
Returns a viewable list of entities based on the registered types.
elgg_register_admin_menu_item($section, $menu_id, $parent_id=null, $priority=100)
Add an admin area section or child section.
ban_user($user_guid, $reason="")
Ban a user.
$enabled
Sample cli installer script.
elgg_get_entities_from_annotations(array $options=[])
Returns entities based upon annotations.
make_user_admin($user_guid)
Makes user $guid an admin.
get_user_access_collections($owner_guid)
Returns access collections owned by the entity.
elgg_deprecated_notice($msg, $dep_version, $backtrace_level=1)
Log a notice about deprecated use of a function, view, etc.
const ELGG_ENTITIES_ANY_VALUE
elgg_get_upgrade_file_version($filename)
Returns the version of the upgrade filename.
elgg_register_menu_item($menu_name, $menu_item)
Register an item for an Elgg menu.
elgg_extract($key, $array, $default=null, $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
remove_all_private_settings($entity_guid)
Deletes all private settings for an entity.
Extends QueryBuilder with ORDER BY clauses.
set_config($name, $value)
Add or update a config setting.
set_private_setting($entity_guid, $name, $value)
Sets a private setting for an entity.
elgg_batch_delete_callback($object)
Delete objects with a delete() method.
_elgg_get_metastring_based_object_from_id($id, $type)
Returns a singular metastring-based object by its ID.
elgg_batch_enable_callback($object)
Enable objects with an enable() method.
delete()
Delete the river item.
elgg_list_entities_from_metadata($options)
Returns a list of entities filtered by provided metadata.
elgg_get_entities_from_private_settings(array $options=[])
Returns entities based upon private settings.
elgg_group_gatekeeper($forward=true, $group_guid=null)
May the current user access item(s) on this page? If the page owner is a group, membership, visibility, and logged in status are taken into account.
elgg_admin_gatekeeper()
Used at the top of a page to mark it as admin only.
elgg_get_entities_from_attributes(array $options=[])
Gets entities based upon attributes in secondary tables.
group_gatekeeper($forward=true, $page_owner_guid=null)
May the current user access item(s) on this page? If the page owner is a group, membership, visibility, and logged in status are taken into account.
get_all_private_settings($entity_guid)
Return an array of all private settings.
create_metadata($entity_guid, $name, $value, $value_type= '', $ignored1=null, $ignored2=null, $allow_multiple=false)
Create a new metadata object, or update an existing one.
elgg_get_entities_from_annotation_calculation($options)
Get entities ordered by a mathematical calculation on annotation values.
is_metadata_independent($type, $subtype)
Determines whether entities of a given type and subtype should not change their metadata in line with...
set_last_login($user_guid)
Sets the last logon time of the given user to right now.
static sanitize($path, $append_slash=true)
Sanitise file paths ensuring that they begin and end with slashes etc.
elgg_get_engine_path()
/path/to/elgg/engine with no trailing slash.
_elgg_services()
Get the global service provider.
get_entity_dates($type= '', $subtype= '', $container_guid=0, $ignored=0, $order_by= 'e.time_created')
Returns a list of months in which entities were updated or created.
elgg_list_entities_from_relationship(array $options=[])
Returns a viewable list of entities by relationship.
_elgg_set_metastring_based_object_enabled_by_id($id, $enabled, $type)
Enables or disables a metastrings-based object by its id.
get_metadata_url($id)
Get the URL for this metadata.
get_data_row($query, $callback=null, array $params=[])
Retrieve a single row from the database.
reload_all_translations()
Reload all translations from all registered paths.
elgg_remove_config($name)
Removes a config setting.
elgg_get_page_owner_guid($guid=0)
Gets the guid of the entity that owns the current page.
gatekeeper()
Alias of elgg_gatekeeper()
if(empty($value)&&$value!==0 &&$value!== '0') $href
create_annotation($entity_guid, $name, $value, $value_type= '', $owner_guid=0, $access_id=ACCESS_PRIVATE)
Create a new annotation.
elgg_get_user_validation_status($user_guid)
Gets the validation status of a user.
elgg_get_config($name, $default=null)
Get an Elgg configuration value.
elgg_is_menu_item_registered($menu_name, $item_name)
Check if a menu item has been registered.
remove_user_admin($user_guid)
Removes user $guid's admin flag.
get_entity($guid)
Loads and returns an entity object from a guid.
elgg_register_rss_link()
Include the RSS icon link and link element in the head.