Exemple #1
0
 /**
  * @param $object object
  * @return Row
  */
 protected function buildRow($object)
 {
     $row = parent::buildRow($object);
     $cell = new Standard_Cell('-');
     $cell->setAttribute('title', '|remove line|');
     $cell->addClass('minus');
     $row->addCell($cell);
     return $row;
 }
 /**
  * @param $result Table
  */
 public function afterHtmlBuilderMultipleBuild(Table $result)
 {
     if ($this->in_multiple == 'build') {
         $table = $result;
         $length = count($table->body->rows) - 1;
         if ($this->count->count > $length) {
             // vertical scrollbar
             $vertical_scroll_bar = new Standard_Cell();
             $vertical_scroll_bar->addClass('vertical');
             $vertical_scroll_bar->addClass('scrollbar');
             $vertical_scroll_bar->setAttribute('rowspan', 1000000);
             $vertical_scroll_bar->setData('start', 0);
             $vertical_scroll_bar->setData('length', $length);
             $vertical_scroll_bar->setData('total', $this->count->count);
             $link = '/Html_Edit_Multiple/output/' . Namespaces::shortClassName($this->property->getDeclaringClass()) . SL . Dao::getObjectIdentifier($this->property->getObject()) . SL . $this->property->name . SL . '?move=';
             $up = new Anchor($link . 'up');
             $up->addClass('up');
             $position = new Anchor($link . 1);
             $position->addClass('position');
             $down = new Anchor($link . 'down');
             $down->addClass('down');
             $vertical_scroll_bar->setContent($up . $position . $down);
             // add vertical scrollbar cells to multiple (collection or map) table
             $table->head->rows[0]->addCell(new Header_Cell(), 0);
             $table->body->rows[0]->addCell($vertical_scroll_bar, 0);
         }
         $this->in_multiple = '';
     }
 }
Exemple #3
0
 /**
  * @param $object   object
  * @param $property Reflection_Property
  * @return Standard_Cell
  */
 protected function buildCell($object, Reflection_Property $property)
 {
     $value = (new Reflection_Property_View($property))->getFormattedValue($object);
     $cell = new Standard_Cell($value);
     $type = $property->getType();
     if ($type->isMultiple()) {
         $cell->addClass('multiple');
     }
     $cell->addClass($type->asString());
     return $cell;
 }