Exemple #1
0
 public function _initVars()
 {
     $site = array();
     $site[] = new Ot_Var_Type_Text('appTitle', 'Application Title', 'The title of the application.', 'OT Framework Application');
     $site[] = new Ot_Var_Type_Textarea('appDescription', 'Application Description', 'The application description.', 'App description!');
     $site[] = new Ot_Var_Type_Text('metaKeywords', 'Keywords', 'The meta keywords you would like to use for the application.', '');
     $site[] = new Ot_Var_Type_Theme('theme', 'Site Theme', 'The display theme for the application', 'default');
     $site[] = new Ot_Var_Type_Select('triggerSystem', 'Trigger System', 'Whether to globally enable or disable the trigger system. Enable in production.', '1', array(0 => 'Disabled', 1 => 'Enabled'));
     $site[] = new Ot_Var_Type_Select('showTrackbackOnError', 'Show Error Trackbacks', 'Switch to show error trackbacks when the application has errors.  Should likely be turned off in production.', '0', array(0 => 'No', 1 => 'Yes'));
     $auth = array();
     $auth[] = new Ot_Var_Type_Multiselect('requiredAccountFields', 'Required User Account Fields', 'When a user logs in, if these fields are not populated, they will be forced to populate the fields before continuing', array('firstName', 'lastName', 'emailAddress'), array('firstName' => 'First Name', 'lastName' => 'Last Name', 'emailAddress' => 'Email Address'));
     $auth[] = new Ot_Var_Type_Role('defaultRole', 'Default Role', 'Default role that a user gets if they are not logged in.', '1');
     $auth[] = new Ot_Var_Type_Role('newAccountRole', 'New Account Role', 'Role which is assigned to users when a new account is created for them', '1');
     $format = array();
     $format[] = new Ot_Var_Type_Text('dateTimeFormat', 'Date/Time Format', 'Date / Time formatted using PHP\'s strftime() function.', '%m/%d/%Y %I:%M %p');
     $format[] = new Ot_Var_Type_Text('medDateFormat', 'Medium Date Format', 'Date formatted using PHP\'s strftime() function.', '%b %e, %Y');
     $format[] = new Ot_Var_Type_Text('longDateCompactFormat', 'Long Date Compact Format', 'Date formatted using PHP\'s strftime() function.', '%a, %b %e, %Y');
     $format[] = new Ot_Var_Type_Text('longDateFormat', 'Long Date Format', 'Date formatted using PHP\'s strftime() function.', '%m/%d/%Y');
     $format[] = new Ot_Var_Type_Text('dayFormat', 'Day Format', 'Date formatted using PHP\'s strftime() function.', '%d');
     $format[] = new Ot_Var_Type_Text('timeFormat', 'Time Format', 'Time formatted using PHP\'s strftime() function.', '%I:%M %p');
     $vr = new Ot_Config_Register();
     $vr->registerVars($site, 'App Settings');
     $vr->registerVars($auth, 'Authentication');
     $vr->registerVars($format, 'Date/Time Formats');
 }