You are here

public function DatePopupTimepickerTimepicker::settingsDefaults in Date Popup Timepicker 7

Get default settings for the plugin.

Return value

array Settings structured array.

1 call to DatePopupTimepickerTimepicker::settingsDefaults()
DatePopupTimepickerTimepicker::fieldSettingsForm in plugins/timepicker/timepicker.inc
Define field settings form.

File

plugins/timepicker/timepicker.inc, line 27

Class

DatePopupTimepickerTimepicker
Class DatePopupTimepickerTimepicker.

Code

public function settingsDefaults() {
  $settings = array(
    // The character to use to separate hours and minutes.
    'timeSeparator' => ':',
    // Define whether or not to show a leading zero for hours < 10.
    'showLeadingZero' => TRUE,
    // Define whether or not to show a leading zero for minutes < 10.
    'showMinutesLeadingZero' => TRUE,
    // Define whether or not to show AM/PM with selected time.
    'showPeriod' => FALSE,
    // Define if the AM/PM labels on the left are displayed.
    'showPeriodLabels' => TRUE,
    // The character to use to separate the time from the time period.
    'periodSeparator' => ' ',
    // Define an alternate input to parse selected time to.
    'altField' => '#alternate_input',
    // Used as default time when input field is empty
    // or for inline timePicker.
    // Set to 'now' for the current time, '' for no highlighted time.
    'defaultTime' => 'now',
    // Trigger options.
    // Define when the timepicker is shown.
    // 'focus': when the input gets focus,
    // 'button' when the button trigger element is clicked.
    // 'both': when the input gets focus and when the button is clicked.
    'showOn' => 'focus',
    // jQuery selector that acts as button trigger. ex: '#trigger_button'.
    'button' => NULL,
    // Localization.
    // Define the locale text for "Hours".
    'hourText' => 'Hour',
    // Define the locale text for "Minute".
    'minuteText' => 'Minute',
    // Define the locale text for periods.
    'amPmText' => array(
      'AM',
      'PM',
    ),
    // Position.
    // Corner of the dialog to position,
    // used with the jQuery UI Position utility if present.
    'myPosition' => 'left top',
    // Corner of the input to position.
    'atPosition' => 'left bottom',
    // Events.
    // Callback function executed before
    // the timepicker is rendered and displayed.
    'beforeShow' => NULL,
    // Define a callback function when an hour / minutes is selected.
    'onSelect' => NULL,
    // Define a callback function when the timepicker is closed.
    'onClose' => NULL,
    // Define a callback to enable / disable certain hours.
    // ex: function onHourShow(hour).
    'onHourShow' => NULL,
    // Define a callback to enable / disable certain minutes.
    // ex: function onMinuteShow(hour, minute).
    'onMinuteShow' => NULL,
    // Custom hours and minutes.
    'hours' => array(
      // First displayed hour.
      'starts' => 0,
      // Last displayed hour.
      'ends' => 23,
    ),
    'minutes' => array(
      // First displayed minute.
      'starts' => 0,
      // Last displayed minute.
      'ends' => 55,
      // Interval of displayed minutes.
      'interval' => 5,
      // Optional extra entries for minutes.
      'manual' => array(),
    ),
    // Number of rows for the input tables, minimum 2,
    // makes more sense if you use multiple of 2.
    'rows' => 4,
    // Define if the hours section is displayed or not.
    // Set to false to get a minute only dialog.
    'showHours' => TRUE,
    // Define if the minutes section is displayed or not.
    // Set to false to get an hour only dialog.
    'showMinutes' => TRUE,
    // Min and Max time.
    // Set the minimum time selectable by the user, disable hours and minutes
    // previous to min time.
    'minTime' => array(
      'hour' => NULL,
      'minute' => NULL,
    ),
    // Set the minimum time selectable by the user, disable hours and minutes
    // after max time.
    'maxTime' => array(
      'hour' => NULL,
      'minute' => NULL,
    ),
    // Buttons.
    // Shows an OK button to confirm the edit.
    'showCloseButton' => FALSE,
    // Text for the confirmation button (ok button).
    'closeButtonText' => 'Done',
    // Shows the 'now' button.
    'showNowButton' => FALSE,
    // Text for the now button.
    'nowButtonText' => 'Now',
    // Shows the deselect time button.
    'showDeselectButton' => FALSE,
    // Text for the deselect button.
    'deselectButtonText' => 'Deselect',
    // Timepicker type.
    'timepickerType' => 'popup',
  );
  return $settings;
}