23 $entity = $event->getEntityParam();
29 $return = $event->getValue();
33 'subtype' =>
$entity->getSubtype(),
34 'container_guid' =>
$entity->container_guid,
40 $return[] = $previous;
44 if (
$next instanceof \ElggMenuItem) {
60 $base_options[
'wheres'] = [
61 function (\Elgg\Database\QueryBuilder
$qb, $main_alias) use ($entity) {
63 $qb->compare(
"{$main_alias}.time_created",
'<', $entity->time_created,
ELGG_VALUE_INTEGER),
65 $qb->compare(
"{$main_alias}.time_created",
'=', $entity->time_created,
ELGG_VALUE_INTEGER),
66 $qb->compare(
"{$main_alias}.guid",
'<', $entity->guid,
ELGG_VALUE_GUID),
71 $base_options[
'order_by'] = [
72 new \Elgg\Database\Clauses\OrderByClause(
'time_created',
'DESC'),
73 new \Elgg\Database\Clauses\OrderByClause(
'guid',
'DESC'),
77 if (empty($previous)) {
81 $previous = $previous[0];
82 return \ElggMenuItem::factory([
85 'title' => $previous->getDisplayName(),
86 'href' => $previous->getUrl(),
87 'entity' => $previous,
88 'icon' =>
'angle-double-left',
89 'link_class' =>
'elgg-button elgg-button-outline',
103 $base_options[
'wheres'] = [
104 function (\Elgg\Database\QueryBuilder
$qb, $main_alias) use ($entity) {
106 $qb->compare(
"{$main_alias}.time_created",
'>', $entity->time_created,
ELGG_VALUE_INTEGER),
108 $qb->compare(
"{$main_alias}.time_created",
'=', $entity->time_created,
ELGG_VALUE_INTEGER),
109 $qb->compare(
"{$main_alias}.guid",
'>', $entity->guid,
ELGG_VALUE_GUID),
114 $base_options[
'order_by'] = [
115 new \Elgg\Database\Clauses\OrderByClause(
'time_created',
'ASC'),
116 new \Elgg\Database\Clauses\OrderByClause(
'guid',
'ASC'),
125 return \ElggMenuItem::factory([
128 'title' =>
$next->getDisplayName(),
129 'href' =>
$next->getUrl(),
131 'icon_alt' =>
'angle-double-right',
132 'link_class' =>
'elgg-button elgg-button-outline',
const ELGG_VALUE_INTEGER
Value types.
elgg_echo(string $message_key, array $args=[], string $language= '')
Elgg language module Functions to manage language and translations.
if($who_can_change_language=== 'nobody') elseif($who_can_change_language=== 'admin_only'&&!elgg_is_admin_logged_in()) $options
elgg_get_entities(array $options=[])
Fetches/counts entities or performs a calculation on their properties.
if(elgg_extract('refresh', $vars)) if(elgg_extract('advance', $vars)===false) $next
Models an event passed to event handlers.