You are here

function hosting_https_status_options in Aegir HTTPS 7.3

Output filter for the HTTPS enabled field.

2 calls to hosting_https_status_options()
hosting_https_nodeapi_site_view in ./hosting_https.nodeapi.inc
Implements hook_nodeapi_TYPE_OP().
hosting_https_site_form in ./hosting_https.nodeapi.inc
Form API code to extend the site form with HTTPS fields.
1 string reference to 'hosting_https_status_options'
hosting_https_site_form in ./hosting_https.nodeapi.inc
Form API code to extend the site form with HTTPS fields.

File

./hosting_https.nodeapi.inc, line 151
NodeAPI functions for the Hosting HTTPS module.

Code

function hosting_https_status_options($status = NULL) {
  $options = array(
    HOSTING_HTTPS_DISABLED => t('Disabled'),
    HOSTING_HTTPS_ENABLED => t('Enabled'),
    HOSTING_HTTPS_REQUIRED => t('Required'),
  );

  // Return a single label matching the requested status.
  if (!is_null($status)) {
    return $options[$status];
  }

  // Return the full mapping, for use as radio options.
  return $options;
}