Elgg  Version 4.3
responses.php
Go to the documentation of this file.
1 <?php
2 
10 if (!elgg_extract('show_responses', $vars, true)) {
11  return;
12 }
13 
14 $entity = elgg_extract('entity', $vars);
15 
16 $responses = elgg_extract('responses', $vars);
17 if ($responses === null && ($entity instanceof \ElggEntity)) {
18  $responses = elgg_view_comments($entity, (bool) elgg_extract('show_add_form', $vars, true));
19 }
20 
21 if (!$responses) {
22  return;
23 }
24 
26  'class' => 'elgg-listing-full-responses',
27 ], $responses);
$responses
Definition: responses.php:16
if(!elgg_extract('show_responses', $vars, true)) $entity
Outputs responses.
Definition: responses.php:14
elgg_format_element($tag_name, array $attributes=[], $text= '', array $options=[])
Format an HTML element.
Definition: output.php:135
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:547
elgg echo
Translates a string.
Definition: deprecated.js:530
$vars['head']
Definition: html.php:24
elgg_view_comments($entity, $add_comment=true, array $vars=[])
Returns rendered comments and a comment form for an entity.
Definition: views.php:883