CMS  Version 3.9
date_picker_manager.inc
Go to the documentation of this file.
1 <?php
7 Fakoli::usingFeature("auto_form");
8 
15 {
16  function DatePickerManager()
17  {
18 
19  }
20 
21  static function setDefaults()
22  {
23  Settings::setDefaultValue("date_picker", "use_mooTools_date_picker", false, Boolean);
24  Settings::setDefaultValue("date_picker", "date_picker_theme", "Dashboard", String, "", "", "Bootstrap\nDashboard\njqui\nMinimal\nVista");
25  }
26 
27 
28  static function registerFieldRenderers()
29  {
30  global $styles;
31 
32  if (Settings::getValue("date_picker", "use_mooTools_date_picker"))
33  {
34  AutoForm::registerFieldRendererClass(DateTime, MooToolsDateTimeFieldRenderer);
35  }
36  }
37 
38  static function addTheme($template)
39  {
40  global $styles;
41 
42  $theme = strtolower(Settings::getValue("date_picker", "date_picker_theme"));
43 
44  $styles .= "<link href='/components/date_picker/css/datepicker.css' rel='stylesheet'/>\n";
45  $styles .= "<link href='/components/date_picker/css/datepicker_{$theme}/datepicker_{$theme}.css' rel='stylesheet'/>\n";
46 
47  return $template;
48  }
49 }
50 ?>
Provides a central management class for event handlers and common functionality for the date_picker c...
static addTheme($template)
static usingFeature()
Uses the specified framework feature(s).
Definition: core.inc:388
Field renderer for date data fields.
static getValue($component, $name)
Retrieve the value of the specified Setting.
Definition: settings.inc:104
static setDefaultValue($component, $name, $value, $field_type="String", $annotation="", $category="", $options="", $weight=0)
Sets the default value of the given component setting.
Definition: settings.inc:174
$styles