public function __construct($atts = null) { parent::__construct($atts); $states = array( '' => '---', 'AL' => 'Alabama', 'AK' => 'Alaska', 'AZ' => 'Arizona', 'AR' => 'Arkansas', 'CA' => 'California', 'CO' => 'Colorado', 'CT' => 'Connecticut', 'DE' => 'Delaware', 'DC' => 'District Of Columbia', 'FL' => 'Florida', 'GA' => 'Georgia', 'HI' => 'Hawaii', 'ID' => 'Idaho', 'IL' => 'Illinois', 'IN' => 'Indiana', 'IA' => 'Iowa', 'KS' => 'Kansas', 'KY' => 'Kentucky', 'LA' => 'Louisiana', 'ME' => 'Maine', 'MD' => 'Maryland', 'MA' => 'Massachusetts', 'MI' => 'Michigan', 'MN' => 'Minnesota', 'MS' => 'Mississippi', 'MO' => 'Missouri', 'MT' => 'Montana', 'NE' => 'Nebraska', 'NV' => 'Nevada', 'NH' => 'New Hampshire', 'NJ' => 'New Jersey', 'NM' => 'New Mexico', 'NY' => 'New York', 'NC' => 'North Carolina', 'ND' => 'North Dakota', 'OH' => 'Ohio', 'OK' => 'Oklahoma', 'OR' => 'Oregon', 'PA' => 'Pennsylvania', 'RI' => 'Rhode Island', 'SC' => 'South Carolina', 'SD' => 'South Dakota', 'TN' => 'Tennessee', 'TX' => 'Texas', 'UT' => 'Utah', 'VT' => 'Vermont', 'VA' => 'Virginia', 'WA' => 'Washington', 'WV' => 'West Virginia', 'WI' => 'Wisconsin', 'WY' => 'Wyoming', ); $this->set('options', $states); }
public function __construct($atts = null) { parent::__construct($atts); $opts = \Core\Licenses\Factory::GetAsOptions(); $this->set('options', $opts); }
public function __construct($atts = null) { parent::__construct($atts); // Set the options for this input as the times in 15-minute intervals // @todo Implement a config option to allow this to be changed to different intervals. // @todo also, allow for switching the time view based on a configuration preference. $times = array(); // Default (blank) $times[''] = '---'; for ($x = 0; $x < 24; $x++) { $hk = $hd = $x; if (strlen($hk) == 1) $hk = '0' . $hk; if($hd == 12){ $ap = 'pm'; } elseif ($hd > 12) { $hd -= 12; $ap = 'pm'; } elseif ($hd == 0) { $hd = 12; $ap = 'am'; } else { $ap = 'am'; } $times["$hk:00"] = "$hd:00 $ap"; $times["$hk:15"] = "$hd:15 $ap"; $times["$hk:30"] = "$hd:30 $ap"; $times["$hk:45"] = "$hd:45 $ap"; } $this->set('options', $times); }
public function render(){ $f = new ModelFactory('PageModel'); if ($this->get('baseurl')) $f->where('baseurl != ' . $this->get('baseurl')); $opts = PageModel::GetPagesAsOptions($f, '-- No Parent Page --'); $this->set('options', $opts); // And continue! return parent::render(); }