Elgg  Version 3.0
deprecated-3.0.php
Go to the documentation of this file.
1 <?php
2 
5 
18 function unset_config($name) {
19  elgg_deprecated_notice(__FUNCTION__ . ' is deprecated. Use elgg_remove_config().', '3.0');
20  return elgg_remove_config($name);
21 }
22 
40 function set_config($name, $value) {
41  elgg_deprecated_notice(__FUNCTION__ . ' is deprecated. Use elgg_save_config().', '3.0');
42  return elgg_save_config($name, $value);
43 }
44 
59 function get_config($name) {
60  elgg_deprecated_notice(__FUNCTION__ . ' is deprecated. Use elgg_get_config().', '3.0');
61  return elgg_get_config($name);
62 }
63 
86 function elgg_register_admin_menu_item($section, $menu_id, $parent_id = null, $priority = 100) {
87  elgg_deprecated_notice(__FUNCTION__ . ' is deprecated. Use elgg_register_menu_item().', '3.0');
88  // make sure parent is registered
89  if ($parent_id && !elgg_is_menu_item_registered('page', $parent_id)) {
91  }
92 
93  // in the admin section parents never have links
94  if ($parent_id) {
95  $href = "admin/$parent_id/$menu_id";
96  } else {
97  $href = "admin/$menu_id";
98  }
99 
100  $name = $menu_id;
101  if ($parent_id) {
102  $name = "$parent_id:$name";
103  }
104 
105  return elgg_register_menu_item('page', [
106  'name' => $name,
107  'href' => $href,
108  'text' => elgg_echo("admin:$name"),
109  'context' => 'admin',
110  'parent_name' => $parent_id,
111  'priority' => $priority,
112  'section' => $section
113  ]);
114 }
115 
128  elgg_deprecated_notice(__FUNCTION__ . ' is deprecated. Metadata no longer is access bound.', '3.0');
129 }
130 
143  elgg_deprecated_notice(__FUNCTION__ . ' is deprecated. Metadata no longer is access bound.', '3.0');
144 
145  return false;
146 }
147 
177  elgg_deprecated_notice(__FUNCTION__ . ' is deprecated. Use elgg_get_entities.', '3.0');
178 
179  $options['metadata_name_value_pairs'] = elgg_extract('attribute_name_value_pairs', $options, []);
180  $options['metadata_name_value_pairs_operator'] = elgg_extract('attribute_name_value_pairs_operator', $options, []);
181 
182  unset($options['attribute_name_value_pairs']);
183  unset($options['attribute_name_value_pairs_operator']);
184 
185  return elgg_get_entities($options);
186 }
187 
198 function ban_user($user_guid, $reason = "") {
199  elgg_deprecated_notice(__FUNCTION__ . ' is deprecated. Use \ElggUser::ban()', '3.0');
200 
202  if (!$user) {
203  return false;
204  }
205 
206  return $user->ban($reason);
207 }
208 
219  elgg_deprecated_notice(__FUNCTION__ . ' is deprecated. Use \ElggUser::unban()', '3.0');
220 
222  if (!$user) {
223  return false;
224  }
225 
226  return $user->unban();
227 }
228 
239  elgg_deprecated_notice(__FUNCTION__ . ' is deprecated. Use \ElggUser::makeAdmin()', '3.0');
240 
242  if (!$user) {
243  return false;
244  }
245 
246  return $user->makeAdmin();
247 }
248 
259  elgg_deprecated_notice(__FUNCTION__ . ' is deprecated. Use \ElggUser::removeAdmin()', '3.0');
260 
262  if (!$user) {
263  return false;
264  }
265 
266  return $user->removeAdmin();
267 }
268 
279  elgg_deprecated_notice(__FUNCTION__ . ' is deprecated. Use \ElggUser::isValidated()', '3.0');
280 
282  if (!$user) {
283  return false;
284  }
285 
286  return $user->isValidated();
287 }
288 
300 function elgg_set_user_validation_status($user_guid, $status, $method = '') {
301  elgg_deprecated_notice(__FUNCTION__ . ' is deprecated. Use \ElggUser::setValidationStatus()', '3.0');
302 
304  if (!$user) {
305  return false;
306  }
307 
308  $user->setValidationStatus($status, $method);
309  return true;
310 }
311 
321  elgg_deprecated_notice(__FUNCTION__ . ' is deprecated. Use \ElggUser::setLastAction()', '3.0');
322 
323  if (!$user instanceof ElggUser) {
324  $user = get_user($user);
325  }
326  if (!$user) {
327  return;
328  }
329 
330  $user->setLastAction();
331 }
332 
342  elgg_deprecated_notice(__FUNCTION__ . ' is deprecated. Use \ElggUser::setLastLogin()', '3.0');
343 
345  if (!$user) {
346  return;
347  }
348 
349  $user->setLastLogin();
350 }
351 
364 function update_metadata($id, $name, $value, $value_type) {
365  elgg_deprecated_notice(__FUNCTION__ . ' is deprecated. Use ElggEntity setter or ElggEntity::setMetadata()', '3.0');
366 
368  if (!$metadata) {
369  return false;
370  }
371 
372  $metadata->name = $name;
373  $metadata->value_type = $value_type;
374  $metadata->value = $value;
375 
376  return $metadata->save();
377 }
378 
397 function create_metadata($entity_guid, $name, $value, $value_type = '', $ignored1 = null,
398  $ignored2 = null, $allow_multiple = false) {
400  __FUNCTION__ . ' is deprecated.
401  Use ElggEntity setter or ElggEntity::setMetadata()',
402  '3.0');
403 
405  if (!$entity) {
406  return false;
407  }
408 
409  if ($allow_multiple) {
410  return $entity->setMetadata($name, $value, $value_type, $allow_multiple);
411  }
412 
413  $metadata = new ElggMetadata();
414  $metadata->entity_guid = $entity_guid;
415  $metadata->name = $name;
416  $metadata->value_type = $value_type;
417  $metadata->value = $value;
418  return $metadata->save();
419 }
420 
433  elgg_deprecated_notice(__FUNCTION__ . ' is deprecated. Use \ElggEntity->getOwnedAccessCollections() or elgg_get_access_collections()', '3.0');
434 
435  return _elgg_services()->accessCollections->getEntityCollections(['owner_guid' => $owner_guid]);
436 }
437 
438 
499  __FUNCTION__ . ' has been deprecated.
500  elgg_get_entities() now accepts all metadata options.
501  ', '3.0');
502 
503  return elgg_get_entities($options);
504 }
505 
519  __FUNCTION__ . ' has been deprecated. Use elgg_list_entities().
520  ', '3.0');
521 
523 }
524 
562  __FUNCTION__ . ' has been deprecated.
563  elgg_get_entities() now accepts all annotation options
564  ', '3.0');
565 
566  return elgg_get_entities($options);
567 }
568 
582  __FUNCTION__ . ' has been deprecated. Use elgg_list_entities().
583  ', '3.0');
585 }
586 
587 
670  __FUNCTION__ . ' has been deprecated.
671  elgg_get_entities() now accepts all relationship options.
672  ', '3.0');
673 
674  return elgg_get_entities($options);
675 }
676 
690  __FUNCTION__ . ' has been deprecated. Use elgg_list_entities().
691  ', '3.0');
692 
694 }
695 
732  __FUNCTION__ . ' has been deprecated.
733  elgg_get_entities() now accepts all private settings options.
734  ', '3.0');
735 
736  return elgg_get_entities($options);
737 }
738 
752  __FUNCTION__ . ' has been deprecated. Use elgg_list_entities().
753  ', '3.0');
754 
756 }
757 
771 
773  __FUNCTION__ . ' has been deprecated.
774  Use elgg_get_entities() with "access_ids" option.
775  ', '3.0');
776 
777  // restrict the resultset to access collection provided
778  if (!isset($options['access_id']) && !isset($options['access_ids'])) {
779  return false;
780  }
781 
782  return elgg_get_entities($options);
783 }
784 
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")
824  ', '3.0');
825 
826  if (empty($options['count'])) {
827  $options['annotation_sort_by_calculation'] = elgg_extract('calculation', $options, 'sum', false);
828  }
829  return Entities::find($options);
830 }
831 
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")
848  ', '3.0');
849 
850  if (empty($options['count'])) {
851  $options['annotation_sort_by_calculation'] = elgg_extract('calculation', $options, 'sum', false);
852  }
853 
854  return elgg_list_entities($options, 'elgg_get_entities');
855 }
856 
857 
875 
877  __FUNCTION__ . ' has been deprecated.
878  Use ElggAnnotation::enable()
879  ', '3.0');
880 
881  if (!in_array($type, ['annotation', 'annotations'])) {
882  return false;
883  }
884 
886  if (!$annotation) {
887  return false;
888  }
889 
890  if ($enabled === 'no' || $enabled === 0 || $enabled === false) {
891  return $annotation->disable();
892  } else if ($enabled === 'yes' || $enabled === 1 || $enabled === true) {
893  return $annotation->enable();
894  }
895 
896  return false;
897 }
898 
910 
912  __FUNCTION__ . ' has been deprecated.
913  Use elgg_get_metadata_from_id() and elgg_get_annotation_from_id()
914  ', '3.0');
915 
916  $id = (int) $id;
917  if (!$id) {
918  return false;
919  }
920 
921  if ($type == 'metadata') {
923  } else {
925  }
926 
927  return $object;
928 }
929 
941 
943  __FUNCTION__ . ' has been deprecated.
944  Use ElggMetadata::delete() and ElggAnnotation::delete()
945  ', '3.0');
946 
947  switch ($type) {
948  case 'annotations':
949  case 'annotation':
951  break;
952 
953  case 'metadata':
955  break;
956 
957  default:
958  return false;
959  }
960 
961  if ($object) {
962  return $object->delete();
963  }
964 
965  return false;
966 }
967 
979  elgg_deprecated_notice(__FUNCTION__ . ' has been deprecated and will be removed', '3.0');
981  if (!$metadata instanceof ElggMetadata) {
982  return;
983  }
984 
985  return $metadata->getURL();
986 }
987 
988 
1004  __FUNCTION__ . ' has been deprecated.
1005  Use ElggAnnotation::save() or ElggEntity::annotate()
1006  ', '3.0'
1007  );
1008 
1009  $annotation = new ElggAnnotation();
1010  $annotation->entity_guid = $entity_guid;
1011  $annotation->name = $name;
1012  $annotation->value_type = $value_type;
1013  $annotation->value = $value;
1014  $annotation->owner_guid = $owner_guid;
1015  $annotation->access_id = $access_id;
1016 
1017  return $annotation->save();
1018 }
1019 
1033 function update_annotation($annotation_id, $name, $value, $value_type, $owner_guid, $access_id) {
1035  __FUNCTION__ . ' has been deprecated.
1036  Use ElggAnnotation::save() or ElggEntity::annotate()
1037  ', '3.0'
1038  );
1039 
1040  $annotation = elgg_get_annotation_from_id($annotation_id);
1041  if (!$annotation) {
1042  return false;
1043  }
1044 
1045  $annotation->name = $name;
1046  $annotation->value_type = $value_type;
1047  $annotation->value = $value;
1048  $annotation->owner_guid = $owner_guid;
1049  $annotation->access_id = $access_id;
1050 
1051  return $annotation->save();
1052 }
1053 
1066  elgg_deprecated_notice(__FUNCTION__ . ' has been deprecated.', '3.0');
1067 
1068  // our db functions return the number of rows affected...
1069  return $object->delete() ? true : false;
1070 }
1071 
1081 function sanitise_filepath($path, $append_slash = true) {
1082  elgg_deprecated_notice(__FUNCTION__ . ' is deprecated. Use \\Elgg\\Project\\Paths::sanitize().', 3.0);
1083 
1084  return \Elgg\Project\Paths::sanitize($path, $append_slash);
1085 }
1086 
1108  __FUNCTION__ . ' has been deprecated.
1109  Use ElggEntity::getPrivateSetting()
1110  ', '3.0');
1111 
1112  $ia = elgg_set_ignore_access(true);
1115 
1116  if (!$entity) {
1117  return null;
1118  }
1119 
1120  return $entity->getPrivateSetting($name);
1121 }
1122 
1137  __FUNCTION__ . ' has been deprecated.
1138  Use ElggEntity::getAllPrivateSettings()
1139  ', '3.0');
1140 
1141  $ia = elgg_set_ignore_access(true);
1144 
1145  if (!$entity) {
1146  return null;
1147  }
1148 
1149  return $entity->getAllPrivateSettings();
1150 }
1151 
1168  __FUNCTION__ . ' has been deprecated.
1169  Use ElggEntity::setPrivateSetting()
1170  ', '3.0');
1171 
1172  $ia = elgg_set_ignore_access(true);
1175 
1176  if (!$entity) {
1177  return false;
1178  }
1179 
1180  return $entity->setPrivateSetting($name, $value);
1181 }
1182 
1198  __FUNCTION__ . ' has been deprecated.
1199  Use ElggEntity::removePrivateSetting()
1200  ', '3.0');
1201 
1202  $ia = elgg_set_ignore_access(true);
1205 
1206  if (!$entity) {
1207  return null;
1208  }
1209 
1210  return $entity->removePrivateSetting($name);
1211 }
1212 
1227  __FUNCTION__ . ' has been deprecated.
1228  Use ElggEntity::removeAllPrivateSettings()
1229  ', '3.0');
1230 
1231  $ia = elgg_set_ignore_access(true);
1234 
1235  if (!$entity) {
1236  return null;
1237  }
1238 
1239  return $entity->removeAllPrivateSettings();
1240 }
1241 
1254  __FUNCTION__ . ' has been deprecated.
1255  Perform batch operations on members of the batch.
1256  ', '3.0');
1257  // our db functions return the number of rows affected...
1258  return $object->enable() ? true : false;
1259 }
1260 
1273  __FUNCTION__ . ' has been deprecated.
1274  Perform batch operations on members of the batch.
1275  ', '3.0');
1276  // our db functions return the number of rows affected...
1277  return $object->disable() ? true : false;
1278 }
1279 
1307 function elgg_register_page_handler($identifier, callable $function) {
1309  __FUNCTION__ . ' has been deprecated.
1310  Use elgg_register_route() to register a named route or define it in elgg-plugin.php',
1311  '3.0'
1312  );
1313  return _elgg_services()->routes->registerPageHandler($identifier, $function);
1314 }
1315 
1327 function elgg_unregister_page_handler($identifier) {
1329  __FUNCTION__ . ' has been deprecated.
1330  Use new routing API to register and unregister routes.',
1331  '3.0'
1332  );
1333  _elgg_services()->routes->unregisterPageHandler($identifier);
1334 }
1335 
1345 function gatekeeper() {
1346  elgg_deprecated_notice(__FUNCTION__ . ' is deprecated. Use elgg_gatekeeper()', '3.0');
1347  elgg_gatekeeper();
1348 }
1349 
1359 function admin_gatekeeper() {
1360  elgg_deprecated_notice(__FUNCTION__ . ' is deprecated. Use elgg_admin_gatekeeper()', '3.0');
1362 }
1363 
1377 function group_gatekeeper($forward = true, $page_owner_guid = null) {
1378  elgg_deprecated_notice(__FUNCTION__ . ' is deprecated. Use elgg_group_gatekeeper()', '3.0');
1380 }
1381 
1382 
1399 function elgg_group_gatekeeper($forward = true, $group_guid = null) {
1400  elgg_deprecated_notice(__FUNCTION__ . ' has been deprecated. Use elgg_entity_gatekeeper()', '3.0');
1401  if (null === $group_guid) {
1402  $group_guid = elgg_get_page_owner_guid();
1403  }
1404 
1405  if (!$group_guid) {
1406  return true;
1407  }
1408 
1409  try {
1410  return elgg_entity_gatekeeper($group_guid);
1411  } catch (Exception $ex) {
1412  if ($forward) {
1413  throw $ex;
1414  } else {
1415  return false;
1416  }
1417  }
1418 }
1419 
1438 function get_data($query, $callback = null, array $params = []) {
1439  elgg_deprecated_notice(__FUNCTION__ . ' is deprecated. Use elgg()->db', '3.0');
1440  return elgg()->db->getData($query, $callback, $params);
1441 }
1442 
1458 function get_data_row($query, $callback = null, array $params = []) {
1459  elgg_deprecated_notice(__FUNCTION__ . ' is deprecated. Use elgg()->db', '3.0');
1460  return elgg()->db->getDataRow($query, $callback, $params);
1461 }
1462 
1476 function insert_data($query, array $params = []) {
1477  elgg_deprecated_notice(__FUNCTION__ . ' is deprecated. Use elgg()->db', '3.0');
1478  return elgg()->db->insertData($query, $params);
1479 }
1480 
1494 function update_data($query, array $params = [], $get_num_rows = false) {
1495  elgg_deprecated_notice(__FUNCTION__ . ' is deprecated. Use elgg()->db', '3.0');
1496  return elgg()->db->updateData($query, $get_num_rows, $params);
1497 }
1498 
1511 function delete_data($query, array $params = []) {
1512  elgg_deprecated_notice(__FUNCTION__ . ' is deprecated. Use elgg()->db', '3.0');
1513  return elgg()->db->deleteData($query, $params);
1514 }
1515 
1527 function register_translations($path, $load_all = false, $language = null) {
1528  elgg_deprecated_notice(__FUNCTION__ . ' is deprecated and should not be used', '3.0');
1529 
1530  return elgg()->translator->registerTranslations($path, $load_all, $language);
1531 }
1532 
1544  elgg_deprecated_notice(__FUNCTION__ . ' is deprecated and should not be used', '3.0');
1545 
1546  return elgg()->translator->reloadAllTranslations();
1547 }
1548 
1570  elgg_deprecated_notice(__FUNCTION__ . ' is deprecated. Use elgg_list_entities()', '3.0');
1571 
1573 
1574  $defaults = [
1575  'full_view' => false,
1576  'allowed_types' => true,
1577  'list_type_toggle' => false,
1578  'pagination' => true,
1579  'offset' => 0,
1580  'types' => [],
1581  'type_subtype_pairs' => [],
1582  ];
1583 
1584  $options = array_merge($defaults, $options);
1585 
1586  $types = get_registered_entity_types();
1587 
1588  foreach ($types as $type => $subtype_array) {
1589  if (in_array($type, $options['allowed_types']) || $options['allowed_types'] === true) {
1590  // you must explicitly register types to show up in here and in search for objects
1591  if ($type == 'object') {
1592  if (is_array($subtype_array) && count($subtype_array)) {
1593  $options['type_subtype_pairs'][$type] = $subtype_array;
1594  }
1595  } else {
1596  if (is_array($subtype_array) && count($subtype_array)) {
1597  $options['type_subtype_pairs'][$type] = $subtype_array;
1598  } else {
1599  $options['type_subtype_pairs'][$type] = ELGG_ENTITIES_ANY_VALUE;
1600  }
1601  }
1602  }
1603  }
1604 
1605  if (!empty($options['type_subtype_pairs'])) {
1606  $count = elgg_get_entities(array_merge(['count' => true], $options));
1607  if ($count > 0) {
1608  $entities = elgg_get_entities($options);
1609  } else {
1610  $entities = [];
1611  }
1612  } else {
1613  $count = 0;
1614  $entities = [];
1615  }
1616 
1617  $options['count'] = $count;
1618  return elgg_view_entity_list($entities, $options);
1619 }
1620 
1630  elgg_deprecated_notice(__FUNCTION__ . ' has been deprecated. Use asynchronous upgrades instead', '3.0');
1631 
1632  preg_match('/^([0-9]{10})([\.a-z0-9-_]+)?\.(php)$/i', $filename, $matches);
1633 
1634  if (isset($matches[1])) {
1635  return (int) $matches[1];
1636  }
1637 
1638  return false;
1639 }
1640 
1649 function elgg_get_upgrade_files($upgrade_path = null) {
1650  elgg_deprecated_notice(__FUNCTION__ . ' has been deprecated. Use asynchronous upgrades instead', '3.0');
1651 
1652  if (!$upgrade_path) {
1653  $upgrade_path = elgg_get_engine_path() . '/lib/upgrades/';
1654  }
1655  $upgrade_path = \Elgg\Project\Paths::sanitize($upgrade_path);
1656 
1657  if (!is_dir($upgrade_path)) {
1658  return false;
1659  }
1660  $handle = opendir($upgrade_path);
1661  if (!$handle) {
1662  return false;
1663  }
1664 
1665  $upgrade_files = [];
1666 
1667  while (($upgrade_file = readdir($handle)) !== false) {
1668  // make sure this is a well formed upgrade.
1669  if (!is_file($upgrade_path . $upgrade_file)) {
1670  continue;
1671  }
1672  $upgrade_version = elgg_get_upgrade_file_version($upgrade_file);
1673  if (!$upgrade_version) {
1674  continue;
1675  }
1676  $upgrade_files[] = $upgrade_file;
1677  }
1678 
1679  sort($upgrade_files);
1680 
1681  return $upgrade_files;
1682 }
1683 
1701 function get_entity_dates($type = '', $subtype = '', $container_guid = 0, $ignored = 0, $order_by = 'e.time_created') {
1702  elgg_deprecated_notice(__FUNCTION__ . ' is deprecated, please use elgg_get_entity_dates()', '3.0');
1703 
1704  $options = [
1705  'types' => $type,
1706  'subtypes' => $subtype,
1707  'container_guids' => $container_guid,
1708  'order_by' => [
1709  new OrderByClause($order_by),
1710  ],
1711  ];
1712 
1714 }
1715 
1733  elgg_deprecated_notice(__FUNCTION__ . ' is deprecated. Use elgg()->group_tools service', '3.0');
1734 
1735  if (!is_array($options)) {
1736  $arguments = func_get_args();
1737  $options = [
1738  'label' => elgg_extract(1, $arguments),
1739  'default_on' => elgg_extract(2, $arguments),
1740  'priority' => null,
1741  ];
1742  }
1743 
1744  elgg()->group_tools->register($name, $options);
1745 }
1746 
1759  elgg_deprecated_notice(__FUNCTION__ . ' is deprecated. Use elgg()->group_tools service', '3.0');
1760 
1761  elgg()->group_tools->unregister($name);
1762 }
1763 
1772 function elgg_get_group_tool_options(\ElggGroup $group = null) {
1773  elgg_deprecated_notice(__FUNCTION__ . ' is deprecated. Use elgg()->group_tools service', '3.0');
1774 
1775  if ($group) {
1776  return elgg()->group_tools->group($group);
1777  }
1778 
1779  return elgg()->group_tools->all();
1780 }
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.
$forward
$query
Definition: groups.php:8
if(!$item instanceof ElggRiverItem) $object
Definition: responses.php:23
if(!$user||!$user->canDelete()) $name
Definition: delete.php:22
elgg_list_entities_from_access_id(array $options=[])
Lists entities from an access collection.
$params
Saves global plugin settings.
Definition: save.php:13
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.
Definition: users.php:40
elgg_view_entity_list($entities, array $vars=[])
Returns a rendered list of entities with pagination.
Definition: views.php:996
$annotation
Elgg default annotation view.
Definition: default.php:10
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...
$access_id
Definition: access.php:11
unset_config($name)
Removes a config setting.
elgg_list_entities_from_annotation_calculation($options)
List entities from an annotation calculation.
$defaults
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.
Definition: entities.php:639
$path
Definition: details.php:89
unban_user($user_guid)
Unban a user.
$subtype
Definition: delete.php:22
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.
$type
Definition: delete.php:21
elgg_get_metadata_from_id($id)
Get a specific metadata object by its id.
Definition: metadata.php:19
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.
Definition: languages.php:21
elgg_list_entities(array $options=[], $getter= 'elgg_get_entities', $viewer= 'elgg_view_entity_list')
Returns a string of rendered entities.
Definition: entities.php:577
$options
Elgg admin footer.
Definition: footer.php:6
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.
$entity_guid
Definition: save.php:9
add_group_tool_option($name, $options=[])
Adds a group tool option.
$metadata
Outputs object metadata $vars[&#39;metadata&#39;] Metadata/menu $vars[&#39;show_entity_menu&#39;] Show the entity m...
Definition: metadata.php:10
$user_guid
Validate a user.
Definition: validate.php:6
get_registered_entity_types($type=null)
Returns registered entity types and subtypes.
Definition: entities.php:736
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.
$owner_guid
$id
River item delete action.
Definition: delete.php:6
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.
Definition: annotations.php:16
elgg_list_entities_from_annotations($options=[])
Returns a viewable list of entities from annotations.
const ACCESS_PRIVATE
Definition: constants.php:12
$entity
Definition: reset.php:8
_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.
$language
Definition: useradd.php:17
elgg_get_entities(array $options=[])
Fetches/counts entities or performs a calculation on their properties.
Definition: entities.php:545
elgg_set_ignore_access($ignore=true)
Set if Elgg&#39;s access system should be ignored.
Definition: access.php:52
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.
$user
Definition: ban.php:7
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.
Definition: elgglib.php:841
const ELGG_ENTITIES_ANY_VALUE
Definition: constants.php:24
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.
Definition: navigation.php:100
elgg_extract($key, $array, $default=null, $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
Definition: elgglib.php:1131
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.
$value
Definition: debugging.php:7
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...
$filename
set_last_login($user_guid)
Sets the last logon time of the given user to right now.
if(elgg_in_context('widget')) $count
Definition: pagination.php:21
static sanitize($path, $append_slash=true)
Sanitise file paths ensuring that they begin and end with slashes etc.
Definition: Paths.php:76
elgg_get_engine_path()
/path/to/elgg/engine with no trailing slash.
_elgg_services()
Get the global service provider.
Definition: elgglib.php:1292
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.
$page_owner_guid
Elgg widget add action.
Definition: add.php:6
$container_guid
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.
Definition: pageowner.php:22
gatekeeper()
Alias of elgg_gatekeeper()
var elgg
Definition: elgglib.js:4
$priority
if(empty($value)&&$value!==0 &&$value!== '0') $href
Definition: tag.php:16
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.
Definition: navigation.php:169
remove_user_admin($user_guid)
Removes user $guid&#39;s admin flag.
get_entity($guid)
Loads and returns an entity object from a guid.
Definition: entities.php:87
elgg_register_rss_link()
Include the RSS icon link and link element in the head.
Definition: views.php:1575