You are here

function _heartbeat_perms_options in Heartbeat 6.4

Same name and namespace in other branches
  1. 7 heartbeat.module \_heartbeat_perms_options()

Helper function to get the options for perm types

Parameters

boolean $profile indicator for personal or profile labels:

Return value

array of perm types

5 calls to _heartbeat_perms_options()
heartbeat_messages_edit in ./heartbeat.admin.inc
Function to maintain and administer heartbeat messages
heartbeat_messages_overview in ./heartbeat.admin.inc
Overview list of heartbeat messages This page must be viewed to make the messages appear in the database after a module is installed as well as make them translatable
views_handler_filter_heartbeat_perms::admin_summary in views/handlers/views_handler_filter_heartbeat_perms.inc
Display the filter on the administrative summary.
views_handler_filter_heartbeat_perms::value_form in views/handlers/views_handler_filter_heartbeat_perms.inc
Child classes should override this function to set the 'value options'. This can use a guard to be used to reduce database hits as much as possible.
_theme_user_message_select_form in ./heartbeat.module
Helper theme function for the activity selection in the user profile form

File

./heartbeat.module, line 1907

Code

function _heartbeat_perms_options($profile = FALSE) {
  if ($profile) {
    return array(
      HEARTBEAT_NONE => 'Never',
      HEARTBEAT_PRIVATE => t('Only me'),
      HEARTBEAT_PUBLIC_TO_CONNECTED => t('Only my friends'),
      HEARTBEAT_PUBLIC_TO_ALL => t('Everyone'),
    );
  }
  else {
    return array(
      HEARTBEAT_PRIVATE => t('Only the user himself is allowed to see this message'),
      HEARTBEAT_PUBLIC_TO_CONNECTED => t('Only user and relations are allowed to see this message'),
      HEARTBEAT_PUBLIC_TO_ALL => t('Everyone can see this message'),
    );
  }
}