Elgg  Version 3.0
comments.php
Go to the documentation of this file.
1 <?php
9 $entity = elgg_extract('entity', $vars);
10 if (!$entity instanceof ElggEntity) {
11  return;
12 }
13 
14 $limit = elgg_extract('limit', $vars, get_input('limit', 0));
15 if (!$limit) {
16  $limit = elgg_trigger_plugin_hook('config', 'comments_per_page', [], 25);
17 }
18 
20  'type' => 'object',
21  'subtype' => 'comment',
22  'container_guid' => $entity->guid,
23  'reverse_order_by' => true,
24  'full_view' => true,
25  'limit' => $limit,
26  'distinct' => false,
27 ]);
elgg_list_entities(array $options=[], $getter= 'elgg_get_entities', $viewer= 'elgg_view_entity_list')
Returns a string of rendered entities.
Definition: entities.php:577
$limit
Definition: comments.php:24
get_input($variable, $default=null, $filter_result=true)
Get some input from variables passed submitted through GET or POST.
Definition: input.php:27
elgg echo
Translates a string.
Definition: languages.js:43
elgg_trigger_plugin_hook($hook, $type, $params=null, $returnvalue=null)
Definition: elgglib.php:720
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
$vars['type']
Definition: save.php:11
$entity
Definition: comments.php:15