20 if (isset(
$vars[
'options_values'])) {
21 if (!is_array(
$vars[
'options_values']) || empty(
$vars[
'options_values'])) {
27 unset(
$vars[
'entity_allows_comments']);
30 $vars[
'class'][] =
'elgg-input-access';
37 'entity_type' => null,
38 'entity_subtype' => null,
39 'container_guid' => null,
42 foreach (
$keys as
$key => $default_value) {
57 $vars[
'data-comment-count'] = (int)
$entity->countComments();
71 }
else if (empty(
$vars[
'options_values']) || !is_array(
$vars[
'options_values'])) {
74 $options_values_ids = array_keys(
$vars[
'options_values']);
75 $vars[
'value'] = $options_values_ids[0];
82 if (!isset(
$vars[
'options_values'])) {
86 if (!isset(
$vars[
'disabled'])) {
87 $vars[
'disabled'] =
false;
91 if (!isset(
$vars[
'options_values'][
$vars[
'value']])) {
93 $display = $acl ? $acl->name :
elgg_echo(
'access:missing_name');
94 $vars[
'options_values'][$vars[
'value']] = $display;
101 && !(
$entity instanceof ElggGroup)) {
102 $show_override_notice =
true;
104 $show_override_notice =
false;
107 if ($show_override_notice) {
108 $vars[
'data-group-acl'] =
$container->group_acl;
111 if ($show_override_notice) {
elgg_extract($key, array $array, $default=null, $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
get_access_collection($collection_id)
Get a specified access collection.
elgg_format_element($tag_name, array $attributes=array(), $text= '', array $options=array())
Format an HTML element.
get_default_access(ElggUser $user=null, array $input_params=array())
Gets the default access permission.
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
get_write_access_array($user_guid=0, $site_guid=0, $flush=false, array $input_params=array())
Returns an array of access permissions that the user is allowed to save content with.
elgg_in_context($context)
Check if this context exists anywhere in the stack.
elgg echo
Translates a string.
elgg_get_page_owner_entity()
Gets the owner entity for the current page.
elgg_view($view, $vars=array(), $bypass=false, $ignored=false, $viewtype= '')
Return a parsed view.
const CONTENT_ACCESS_MODE_MEMBERS_ONLY