22 return _elgg_services()->entityTable->getEntityClass($type, $subtype);
508 return \Elgg\Database\Entities::find(
$options);
553 $viewer = $viewer ??
'elgg_view_entity_list';
560 'full_view' =>
false,
561 'pagination' =>
true,
563 'preload_owners' =>
true,
564 'preload_containers' =>
true,
570 if (
$options[
'register_rss_link']) {
576 $options[
'count'] = is_array($entities) ?
count($entities) : 0;
578 if (!is_array($entities) && $viewer ===
'elgg_view_entity_list') {
581 return elgg_echo(
'list:error:getter:user');
584 if (!empty($entities) || !empty(
$options[
'offset'])) {
585 $count_needed =
true;
587 $count_needed =
false;
589 $count_needed =
false;
591 $count_needed =
false;
595 $options[
'count'] =
true;
597 $options[
'count'] = (int) call_user_func(
$getter, $options);
601 return call_user_func($viewer, $entities,
$options);
617 return \Elgg\Database\Entities::with(
$options)->getDates();
647 }
catch (\
Elgg\Exceptions\DomainException $e) {
668 return "{$main_alias}.type";
671 return "{$main_alias}.subtype";
677 'callback' =>
function($row) {
679 'type' => $row->type,
680 'subtype' => $row->subtype,
681 'total' => $row->total,
694 foreach (
$rows as $row) {
696 if (!isset($entity_stats[
$type]) || !is_array($entity_stats[$type])) {
697 $entity_stats[
$type] = [];
700 $entity_stats[
$type][$row->subtype] = $row->total;
732 _elgg_services()->entity_capabilities->setCapability($type, $subtype, $capability,
true);
746 _elgg_services()->entity_capabilities->setCapability($type, $subtype, $capability,
false);
758 return _elgg_services()->entity_capabilities->getTypesWithCapability($capability);
elgg_entity_disable_capability(string $type, string $subtype, string $capability)
Disables the capability for a specified type/subtype.
elgg_call(int $flags, Closure $closure)
Calls a callable autowiring the arguments using public DI services and applying logic based on flags...
elgg_get_entity_class(string $type, string $subtype)
Return the class name registered as a constructor for an entity of a given type and subtype...
elgg_get_entity_dates(array $options=[])
Returns a list of months in which entities were updated or created.
c Accompany it with the information you received as to the offer to distribute corresponding source complete source code means all the source code for all modules it plus any associated interface definition plus the scripts used to control compilation and installation of the executable as a special the source code distributed need not include anything that is normally and so on of the operating system on which the executable unless that component itself accompanies the executable If distribution of executable or object code is made by offering access to copy from a designated then offering equivalent access to copy the source code from the same place counts as distribution of the source even though third parties are not compelled to copy the source along with the object code You may not or distribute the Program except as expressly provided under this License Any attempt otherwise to sublicense or distribute the Program is void
elgg_echo(string $message_key, array $args=[], string $language= '')
Elgg language module Functions to manage language and translations.
Database abstraction query builder.
elgg_get_entity_as_row(int $guid)
Returns a database row from the entities table.
elgg_entity_enable_capability(string $type, string $subtype, string $capability)
Enables the capability for a specified type/subtype.
if($item instanceof\ElggEntity) elseif($item instanceof\ElggRiverItem) elseif($item instanceof\ElggRelationship) elseif(is_callable([$item, 'getType']))
elgg_get_entity_statistics(array $options=[])
Return an array reporting the number of various entities in the system.
elgg_extract($key, $array, $default=null, bool $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
if($who_can_change_language=== 'nobody') elseif($who_can_change_language=== 'admin_only'&&!elgg_is_admin_logged_in()) $options
elgg_entity_exists(int $guid)
Does an entity exist?
const ELGG_IGNORE_ACCESS
elgg_call() flags
get_entity(int $guid)
Loads and returns an entity object from a guid.
elgg_get_entities(array $options=[])
Fetches/counts entities or performs a calculation on their properties.
elgg_count_entities(array $options=[])
Returns a count of entities.
elgg_get_site_entity()
Get the current site entity.
Extends QueryBuilder with ORDER BY clauses.
elgg_list_entities(array $options=[], callable $getter=null, callable $viewer=null)
Returns a string of rendered entities.
elgg_set_entity_class(string $type, string $subtype, string $class= '')
Sets class constructor name for entities with given type and subtype.
elgg_entity_types_with_capability(string $capability)
Returns an array of type/subtypes with the requested capability enabled.
_elgg_services()
Get the global service provider.
elgg_entity_has_capability(string $type, string $subtype, string $capability, bool $default=false)
Checks if a capability is enabled for a specified type/subtype.
elgg_search(array $options=[])
Returns search results as an array of entities, as a batch, or a count, depending on parameters given...
$guid
Reset an ElggUpgrade.
elgg_register_rss_link()
Include the RSS icon link and link element in the head.