19 return _elgg_services()->entityTable->getEntityClass($type, $subtype);
505 return \Elgg\Database\Entities::find(
$options);
550 $viewer = $viewer ??
'elgg_view_entity_list';
557 'full_view' =>
false,
558 'pagination' =>
true,
560 'preload_owners' =>
true,
561 'preload_containers' =>
true,
567 if (
$options[
'register_rss_link']) {
573 $options[
'count'] = is_array($entities) ?
count($entities) : 0;
575 if (!is_array($entities) && $viewer ===
'elgg_view_entity_list') {
578 return elgg_echo(
'list:error:getter:user');
581 if (!empty($entities) || !empty(
$options[
'offset'])) {
582 $count_needed =
true;
584 $count_needed =
false;
586 $count_needed =
false;
588 $count_needed =
false;
592 $options[
'count'] =
true;
594 $options[
'count'] = (int) call_user_func(
$getter, $options);
598 return call_user_func($viewer, $entities,
$options);
614 return \Elgg\Database\Entities::with(
$options)->getDates();
644 }
catch (\
Elgg\Exceptions\DomainException $e) {
659 $select = Select::fromTable(
'entities');
660 $select->select(
'type')
661 ->addSelect(
'subtype')
662 ->addSelect(
'count(*) AS total')
665 ->addGroupBy(
'subtype')
666 ->orderBy(
'total',
'desc');
675 foreach (
$rows as $row) {
713 _elgg_services()->entity_capabilities->setCapability($type, $subtype, $capability,
true);
727 _elgg_services()->entity_capabilities->setCapability($type, $subtype, $capability,
false);
739 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_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_statistics(int $owner_guid=0)
Return an array reporting the number of various entities in the system.
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.
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_extract($key, $array, $default=null, bool $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
elgg_entity_exists(int $guid)
Does an entity exist?
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_log($message, $level=\Psr\Log\LogLevel::NOTICE)
Log a message.
elgg_count_entities(array $options=[])
Returns a count of entities.
elgg_get_site_entity()
Get the current site entity.
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.