/** * */ public function makeTSortList($properties) { $widget = new TSortList((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->{'value'})) { $widget->setValue((string) $properties->{'value'}); } 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); $this->fields[] = $widget; $this->fieldsByName[(string) $properties->{'name'}] = $widget; return $widget; }