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 (!empty($entities) || !empty(
$options[
'offset'])) {
576 $count_needed =
true;
578 $count_needed =
false;
580 $count_needed =
false;
582 $count_needed =
false;
586 $options[
'count'] =
true;
588 $options[
'count'] = (int) call_user_func(
$getter, $options);
592 return call_user_func($viewer, $entities,
$options);
608 return \Elgg\Database\Entities::with(
$options)->getDates();
638 }
catch (\
Elgg\Exceptions\DomainException $e) {
653 $select = Select::fromTable(
'entities');
654 $select->select(
'type')
655 ->addSelect(
'subtype')
656 ->addSelect(
'count(*) AS total')
659 ->addGroupBy(
'subtype')
660 ->orderBy(
'total',
'desc');
669 foreach (
$rows as $row) {
707 _elgg_services()->entity_capabilities->setCapability($type, $subtype, $capability,
true);
721 _elgg_services()->entity_capabilities->setCapability($type, $subtype, $capability,
false);
733 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_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_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.