20 if (isset(
$vars[
'options_values'])) {
21 if (!is_array(
$vars[
'options_values']) || empty(
$vars[
'options_values'])) {
27 unset(
$vars[
'entity_allows_comments']);
36 'entity_type' => null,
37 'entity_subtype' => null,
38 'container_guid' => null,
41 foreach (
$keys as
$key => $default_value) {
56 $vars[
'data-comment-count'] = (int)
$entity->countComments();
70 }
else if (empty(
$vars[
'options_values']) || !is_array(
$vars[
'options_values'])) {
73 $options_values_ids = array_keys(
$vars[
'options_values']);
74 $vars[
'value'] = $options_values_ids[0];
81 if (!isset(
$vars[
'options_values'])) {
85 if (!isset(
$vars[
'disabled'])) {
86 $vars[
'disabled'] =
false;
90 if (!isset(
$vars[
'options_values'][
$vars[
'value']])) {
92 $display = $acl ? $acl->name :
elgg_echo(
'access:missing_name');
93 $vars[
'options_values'][$vars[
'value']] = $display;
100 && !(
$entity instanceof ElggGroup)) {
101 $show_override_notice =
true;
103 $show_override_notice =
false;
106 if ($show_override_notice) {
107 $vars[
'data-group-acl'] =
$container->group_acl;
110 if ($show_override_notice) {
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
get_access_collection($collection_id)
Get a specified access collection.
elgg_extract_class(array $array, $existing=[])
Extract class names from an array with key "class", optionally merging into a preexisting set...
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.
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_view($view, $vars=array(), $ignore1=false, $ignore2=false, $viewtype= '')
Return a parsed view.
elgg_get_page_owner_entity()
Gets the owner entity for the current page.
elgg_extract($key, $array, $default=null, $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
const CONTENT_ACCESS_MODE_MEMBERS_ONLY