You are here

function availability_calendar_booking_formlet_format_key in Availability Calendars 7.3

Same name and namespace in other branches
  1. 7.5 booking_formlet/availability_calendar_booking_formlet.inc \availability_calendar_booking_formlet_format_key()
  2. 7.4 booking_formlet/availability_calendar_booking_formlet.module \availability_calendar_booking_formlet_format_key()
1 call to availability_calendar_booking_formlet_format_key()
availability_calendar_booking_formlet_field_formatter_settings_summary in booking_formlet/availability_calendar_booking_formlet.module
Implements hook_field_formatter_settings_summary(). @link http://api.drupal.org/api/drupal/modules--field_ui--field_ui.api.php/fun...

File

booking_formlet/availability_calendar_booking_formlet.module, line 391
Availability Calendar booking formlet module. This submdule of the Availability Calendar module defines a field that shows a small booking form that interacts with a calendar field. The form only has an arraival and departure date field and a submit…

Code

function availability_calendar_booking_formlet_format_key($key) {
  $key = check_plain($key);

  // Put angle brackets around (first part of) the key.
  $pos = strpos($key, '[');
  if ($pos === FALSE) {
    $key = "[{$key}]";
  }
  else {
    $key = '[' . substr($key, 0, $pos) . ']' . substr($key, $pos);
  }
  return $key;
}