Пример #1
0
 /**
  * 
  */
 public function makeTMultiSearch($properties)
 {
     $widget = new TMultiSearch((string) $properties->{'name'});
     $pieces = explode("\n", (string) $properties->{'items'});
     $items = array();
     if ($pieces) {
         foreach ($pieces as $line) {
             $part = explode(':', $line);
             $items[$part[0]] = $part[1];
         }
     }
     $widget->addItems($items);
     if (isset($properties->{'tip'})) {
         $widget->setTip((string) $properties->{'tip'});
     }
     $widget->setSize((int) $properties->{'width'}, (int) $properties->{'height'});
     $widget->setProperty('style', 'box-sizing: border-box !important', FALSE);
     $widget->setMinLength((int) $properties->{'minlen'});
     $widget->setMaxSize((int) $properties->{'maxsize'});
     $this->fields[] = $widget;
     $this->fieldsByName[(string) $properties->{'name'}] = $widget;
     return $widget;
 }