Example #1
0
 /**
  * Drawing control
  *
  * @brief Draw
  */
 public function draw()
 {
     echo $this->contentWithKey('prepend');
     // Create the label
     $label = $this->label();
     // Display right label
     echo is_null($label) ? '' : $label->html();
     $input = new WPDKHTMLTagSelect($this->item['options'], $this->name, $this->id);
     $input->class = $this->class;
     $input->class[] = 'wpdk-form-select';
     $input->class[] = 'wpdk-form-select-size';
     $input->class[] = 'wpdk-ui-control';
     $input->data = isset($this->item['data']) ? $this->item['data'] : array();
     $input->style = isset($this->item['style']) ? $this->item['style'] : null;
     $input->multiple = 'multiple';
     $input->size = isset($this->item['size']) ? $this->item['size'] : 5;
     $input->value = isset($this->item['value']) ? $this->item['value'] : array();
     $input->setPropertiesByArray(isset($this->item['attrs']) ? $this->item['attrs'] : '');
     $input->display();
     echo $this->contentWithKey('append');
 }