Example #1
0
                $cell->setCssClass($formElement->getClass());
                $cell->setContent($formElement->display());
                $row->addCell($cell);
            }
            $cell = new base_html_model_table_Cell();
            $cell->setCssClass('orderAmount');
            $medOrder = Factory::createObject('MedOrder');
            $fi = $medOrder->getFieldinfo('amount');
            $formElement = base_form_element_Factory::createElement($fi);
            $formElement->setClass($formElement->getClass() . ' orderAmount');
            $formElement->setMultiline();
            $formElement->setName('orderAmount');
            $formElement->setValue(0);
            $formElement->setDisplayMode(DisplayClass::EDIT);
            $content = $formElement->display();
            $formElement = new base_form_element_Hidden($obj->getFieldinfo('LK'));
            $formElement->setMultiline();
            $formElement->setName('LK');
            $value = $obj['LK'];
            $formElement->setValue($value);
            $content .= " " . $formElement->display();
            $cell->setContent($content);
            $row->addCell($cell);
            $table->addRow($row);
        }
        $od->addContent($table->toString());

        $table = new base_html_model_Table();
        $table->setId('orderTable');
        $row = new base_html_model_table_Row();
        $row->setRowType(base_html_model_table_Row::ROWTAG_HEAD);
Example #2
0
 public function display()
 {
     if (!isset($this->displayMode) || $this->displayMode == DisplayClass::VIEW) {
         return $this->getReadOnlyDisplay();
     } elseif ($this->displayMode == DisplayClass::EDIT) {
         return $this->getWriteDisplay();
     } else {
         $hidden = new base_form_element_Hidden(new Fieldinfo('BaseObject'));
         $hidden->setName($this->getName());
         if ($this->isMultiline())  {
             $hidden->setMultiline();
         }
         $hidden->setValue($this->getValue());
         return $hidden->display();
     }
 }