Elgg  Version master
comments.php
Go to the documentation of this file.
1 <?php
2 
4  '#type' => 'select',
5  '#label' => elgg_echo('config:content:comments_max_depth'),
6  '#help' => elgg_echo('config:content:comments_max_depth:help'),
7  'name' => 'comments_max_depth',
8  'value' => elgg_get_config('comments_max_depth'),
9  'options_values' => [
10  0 => elgg_echo('config:content:comments_max_depth:none'),
11  2 => 2,
12  3 => 3,
13  4 => 4,
14  ],
15 ]);
16 
18  '#type' => 'checkbox',
19  '#label' => elgg_echo('config:content:comment_box_collapses'),
20  '#help' => elgg_echo('config:content:comment_box_collapses:help'),
21  'name' => 'comment_box_collapses',
22  'checked' => (bool) elgg_get_config('comment_box_collapses'),
23  'switch' => true,
24  'value' => 1,
25 ]);
26 
28  '#type' => 'checkbox',
29  '#label' => elgg_echo('config:content:comments_latest_first'),
30  '#help' => elgg_echo('config:content:comments_latest_first:help'),
31  'name' => 'comments_latest_first',
32  'checked' => (bool) elgg_get_config('comments_latest_first'),
33  'switch' => true,
34  'value' => 1,
35 ]);
36 
38  '#type' => 'number',
39  '#label' => elgg_echo('config:content:comments_per_page'),
40  'name' => 'comments_per_page',
41  'value' => elgg_get_config('comments_per_page'),
42  'min' => 1,
43  'step' => 1,
44 ]);
45 
47  '#type' => 'checkbox',
48  '#label' => elgg_echo('config:content:comments_group_only'),
49  'name' => 'comments_group_only',
50  'checked' => (bool) elgg_get_config('comments_group_only'),
51  'switch' => true,
52  'value' => 1,
53 ]);
54 
55 echo elgg_view_module('info', elgg_echo('admin:legend:comments'), $body);
elgg_view_module(string $type, string $title, string $body, array $vars=[])
Wrapper function for the module display pattern.
Definition: views.php:919
elgg_view_field(array $params=[])
Renders a form field, usually with a wrapper element, a label, help text, etc.
Definition: views.php:1112
elgg_get_config(string $name, $default=null)
Get an Elgg configuration value.
elgg_echo(string $message_key, array $args=[], string $language= '')
Elgg language module Functions to manage language and translations.
Definition: languages.php:17
$body
Definition: comments.php:3