Elgg  Version 2.3
content_access.php
Go to the documentation of this file.
1 <?php
7  '#type' => 'access',
8  'options_values' => [
9  ACCESS_PRIVATE => elgg_echo('PRIVATE'),
10  ACCESS_FRIENDS => elgg_echo('access:friends:label'),
11  ACCESS_LOGGED_IN => elgg_echo('LOGGED_IN'),
12  ACCESS_PUBLIC => elgg_echo('PUBLIC'),
13  ],
14  'name' => 'default_access',
15  '#label' => elgg_echo('installation:sitepermissions'),
16  '#help' => elgg_echo('admin:site:access:warning'),
17  'value' => elgg_get_config('default_access'),
18 ]);
19 
21  '#type' => 'checkbox',
22  'label' => elgg_echo('installation:allow_user_default_access:label'),
23  '#help' => elgg_echo('installation:allow_user_default_access:description'),
24  'name' => 'allow_user_default_access',
25  'checked' => (bool)elgg_get_config('allow_user_default_access'),
26 ]);
27 
28 echo elgg_view_module('inline', elgg_echo('admin:legend:content_access'), $body, ['id' => 'elgg-settings-advanced-content-access']);
elgg_get_config($name, $site_guid=0)
Get an Elgg configuration value.
elgg_view_field(array $params=[])
Renders a form field, usually with a wrapper element, a label, help text, etc.
Definition: views.php:1424
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
const ACCESS_FRIENDS
Definition: elgglib.php:2085
$body
Advanced site settings, content access section.
const ACCESS_PRIVATE
Definition: elgglib.php:2082
elgg echo
Translates a string.
Definition: languages.js:48
elgg_view_module($type, $title, $body, array $vars=array())
Wrapper function for the module display pattern.
Definition: views.php:1250
const ACCESS_PUBLIC
Definition: elgglib.php:2084
const ACCESS_LOGGED_IN
Definition: elgglib.php:2083