Elgg  Version 4.3
default_access.php
Go to the documentation of this file.
1 <?php
8 if (!elgg_get_config('allow_user_default_access')) {
9  return;
10 }
11 
13 if (!$user instanceof ElggUser) {
14  return;
15 }
16 
17 $default_access = $user->getPrivateSetting('elgg_default_access');
18 if ($default_access === null) {
19  $default_access = elgg_get_config('default_access');
20 }
21 
22 $title = elgg_echo('default_access:settings');
24  '#type' => 'access',
25  '#label' => elgg_echo('default_access:label'),
26  'name' => 'default_access',
27  'value' => $default_access,
28 ]);
29 
$content
elgg_view_field(array $params=[])
Renders a form field, usually with a wrapper element, a label, help text, etc.
Definition: views.php:1143
elgg_echo($message_key, array $args=[], $language="")
Elgg language module Functions to manage language and translations.
Definition: languages.php:18
elgg_view_module($type, $title, $body, array $vars=[])
Wrapper function for the module display pattern.
Definition: views.php:944
elgg_get_page_owner_entity()
Gets the owner entity for the current page.
Definition: pageowner.php:23
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
if(!elgg_get_config('allow_user_default_access')) $user
Provide a way of setting your default access.
elgg echo
Translates a string.
Definition: deprecated.js:530
$vars['head']
Definition: html.php:24
if($default_access===null) $title
elgg_get_config($name, $default=null)
Get an Elgg configuration value.
if(!$user instanceof ElggUser) $default_access