Elgg  Version master
content.php
Go to the documentation of this file.
1 <?php
2 
4  '#type' => 'switch',
5  'label' => elgg_echo('installation:walled_garden:label'),
6  '#help' => elgg_echo('installation:walled_garden:description'),
7  'name' => 'walled_garden',
8  'value' => elgg_get_config('walled_garden'),
9 ]);
10 
12  '#type' => 'access',
13  'options_values' => [
14  ACCESS_PRIVATE => elgg_echo('access:label:private'),
15  ACCESS_LOGGED_IN => elgg_echo('access:label:logged_in'),
16  ACCESS_PUBLIC => elgg_echo('access:label:public'),
17  ],
18  'name' => 'default_access',
19  '#label' => elgg_echo('installation:sitepermissions'),
20  '#help' => elgg_echo('admin:site:access:warning'),
21  'value' => elgg_get_config('default_access'),
22 ]);
23 
25  '#type' => 'switch',
26  'label' => elgg_echo('installation:allow_user_default_access:label'),
27  '#help' => elgg_echo('installation:allow_user_default_access:description'),
28  'name' => 'allow_user_default_access',
29  'value' => elgg_get_config('allow_user_default_access'),
30 ]);
31 
33  '#type' => 'number',
34  'name' => 'default_limit',
35  '#label' => elgg_echo('installation:default_limit'),
36  'value' => elgg_get_config('default_limit'),
37  'min' => 1,
38  'step' => 1,
39 ]);
40 
42  '#type' => 'select',
43  '#label' => elgg_echo('config:content:pagination_behaviour'),
44  '#help' => elgg_echo('config:content:pagination_behaviour:help'),
45  'name' => 'pagination_behaviour',
46  'value' => elgg_get_config('pagination_behaviour'),
47  'options_values' => [
48  'navigate' => elgg_echo('config:content:pagination_behaviour:navigate'),
49  'ajax-replace' => elgg_echo('config:content:pagination_behaviour:ajax-replace'),
50  'ajax-append' => elgg_echo('config:content:pagination_behaviour:ajax-append'),
51  'ajax-append-auto' => elgg_echo('config:content:pagination_behaviour:ajax-append-auto'),
52  ],
53 ]);
54 
56  '#type' => 'select',
57  '#label' => elgg_echo('config:content:mentions_display_format'),
58  '#help' => elgg_echo('config:content:mentions_display_format:help'),
59  'name' => 'mentions_display_format',
60  'value' => elgg_get_config('mentions_display_format'),
61  'options_values' => [
62  'display_name' => elgg_echo('config:content:mentions_display_format:display_name'),
63  'username' => elgg_echo('config:content:mentions_display_format:username'),
64  ],
65 ]);
66 
68  '#type' => 'switch',
69  '#label' => elgg_echo('config:content:trash_enabled:label'),
70  '#help' => elgg_echo('config:content:trash_enabled:help'),
71  'name' => 'trash_enabled',
72  'value' => elgg_get_config('trash_enabled'),
73 ]);
74 
76  '#type' => 'number',
77  '#label' => elgg_echo('config:content:trash_retention:label'),
78  '#help' => elgg_echo('config:content:trash_retention:help'),
79  '#class' => ['elgg-divide-left', 'plm'],
80  'name' => 'trash_retention',
81  'value' => (int) elgg_get_config('trash_retention'),
82  'min' => 0,
83 ]);
84 
85 echo elgg_view_module('info', elgg_echo('admin:legend:content'), $body);
elgg_get_config(string $name, $default=null)
Get an Elgg configuration value.
const ACCESS_PRIVATE
Definition: constants.php:10
const ACCESS_LOGGED_IN
Definition: constants.php:11
const ACCESS_PUBLIC
Definition: constants.php:12
$body
Definition: content.php:3
elgg_echo(string $message_key, array $args=[], string $language='')
Elgg language module Functions to manage language and translations.
Definition: languages.php:17
elgg_view_module(string $type, string $title, string $body, array $vars=[])
Wrapper function for the module display pattern.
Definition: views.php:930
elgg_view_field(array $params=[])
Renders a form field, usually with a wrapper element, a label, help text, etc.
Definition: views.php:1116