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