Exemplo n.º 1
0
 /**
  * Add condition field with chosen
  * @param string $name
  * @param string $table
  * @param string $key
  * @param string $label
  * @param string $placeholder
  */
 private function addConditionFieldWithChosen($name, $table, $key, $label, $placeholder)
 {
     if ($table == 'weather') {
         $Field = new TrainingSelectWeather($name, $label);
     } else {
         $Field = new FormularSelectDb($name, $label);
         $Field->loadOptionsFrom($table, $key);
     }
     $Field->addCSSclass('chzn-select full-size');
     $Field->setMultiple();
     $Field->addAttribute('data-placeholder', $placeholder);
     $Field->setLayout(FormularFieldset::$LAYOUT_FIELD_W50_IN_W33);
     $this->Fieldset->addField($Field);
 }