Elgg  Version 4.3
content.php
Go to the documentation of this file.
1 <?php
2 
4  '#type' => 'checkbox',
5  'label' => elgg_echo('installation:walled_garden:label'),
6  '#help' => elgg_echo('installation:walled_garden:description'),
7  'name' => 'walled_garden',
8  'checked' => (bool) elgg_get_config('walled_garden'),
9  'switch' => true,
10 ]);
11 
13  '#type' => 'access',
14  'options_values' => [
15  ACCESS_PRIVATE => elgg_echo('access:label:private'),
16  ACCESS_LOGGED_IN => elgg_echo('access:label:logged_in'),
17  ACCESS_PUBLIC => elgg_echo('access:label:public'),
18  ],
19  'name' => 'default_access',
20  '#label' => elgg_echo('installation:sitepermissions'),
21  '#help' => elgg_echo('admin:site:access:warning'),
22  'value' => elgg_get_config('default_access'),
23 ]);
24 
26  '#type' => 'checkbox',
27  'label' => elgg_echo('installation:allow_user_default_access:label'),
28  '#help' => elgg_echo('installation:allow_user_default_access:description'),
29  'name' => 'allow_user_default_access',
30  'checked' => (bool) elgg_get_config('allow_user_default_access'),
31  'switch' => true,
32 ]);
33 
35  '#type' => 'number',
36  'name' => 'default_limit',
37  '#label' => elgg_echo('installation:default_limit'),
38  'value' => elgg_get_config('default_limit'),
39  'min' => 1,
40  'step' => 1,
41 ]);
42 
44  '#type' => 'select',
45  '#label' => elgg_echo('config:content:pagination_behaviour'),
46  '#help' => elgg_echo('config:content:pagination_behaviour:help'),
47  'name' => 'pagination_behaviour',
48  'value' => elgg_get_config('pagination_behaviour'),
49  'options_values' => [
50  'navigate' => elgg_echo('config:content:pagination_behaviour:navigate'),
51  'ajax-replace' => elgg_echo('config:content:pagination_behaviour:ajax-replace'),
52  'ajax-append' => elgg_echo('config:content:pagination_behaviour:ajax-append'),
53  'ajax-append-auto' => elgg_echo('config:content:pagination_behaviour:ajax-append-auto'),
54  ],
55 ]);
56 
58  '#type' => 'select',
59  '#label' => elgg_echo('config:content:comments_max_depth'),
60  '#help' => elgg_echo('config:content:comments_max_depth:help'),
61  'name' => 'comments_max_depth',
62  'value' => elgg_get_config('comments_max_depth'),
63  'options_values' => [
64  0 => elgg_echo('config:content:comments_max_depth:none'),
65  2 => 2,
66  3 => 3,
67  4 => 4,
68  ],
69 ]);
70 
72  '#type' => 'checkbox',
73  '#label' => elgg_echo('config:content:comment_box_collapses'),
74  '#help' => elgg_echo('config:content:comment_box_collapses:help'),
75  'name' => 'comment_box_collapses',
76  'checked' => (bool) elgg_get_config('comment_box_collapses'),
77  'switch' => true,
78  'value' => 1,
79 ]);
80 
82  '#type' => 'checkbox',
83  '#label' => elgg_echo('config:content:comments_latest_first'),
84  '#help' => elgg_echo('config:content:comments_latest_first:help'),
85  'name' => 'comments_latest_first',
86  'checked' => (bool) elgg_get_config('comments_latest_first'),
87  'switch' => true,
88  'value' => 1,
89 ]);
90 
92  '#type' => 'number',
93  '#label' => elgg_echo('config:content:comments_per_page'),
94  'name' => 'comments_per_page',
95  'value' => elgg_get_config('comments_per_page'),
96  'min' => 1,
97  'step' => 1,
98 ]);
99 
101  '#type' => 'checkbox',
102  '#label' => elgg_echo('config:content:comments_group_only'),
103  'name' => 'comments_group_only',
104  'checked' => (bool) elgg_get_config('comments_group_only'),
105  'switch' => true,
106  'value' => 1,
107 ]);
108 
109 echo elgg_view_module('info', elgg_echo('admin:legend:content'), $body);
elgg_view_field(array $params=[])
Renders a form field, usually with a wrapper element, a label, help text, etc.
Definition: views.php:1143
$body
Definition: content.php:3
elgg_echo($message_key, array $args=[], $language="")
Elgg language module Functions to manage language and translations.
Definition: languages.php:18
const ACCESS_PRIVATE
Definition: constants.php:12
const ACCESS_LOGGED_IN
Definition: constants.php:13
elgg_view_module($type, $title, $body, array $vars=[])
Wrapper function for the module display pattern.
Definition: views.php:944
elgg echo
Translates a string.
Definition: deprecated.js:530
const ACCESS_PUBLIC
Definition: constants.php:14
elgg_get_config($name, $default=null)
Get an Elgg configuration value.