Exemplo n.º 1
0
 /**
  * Decorates the connection with a form option
  * @param zibo\library\html\table\Cell $cell Cell to decorate
  * @param zibo\library\html\table\Row $row Row of the cell to decorate
  * @param integer $rowNumber Number of the current row
  * @param array $remainingValues Array containing the values of the remaining rows of the table
  * @return null
  */
 public function decorate(Cell $cell, Row $row, $rowNumber, array $remainingValues)
 {
     $connection = $cell->getValue();
     $field = new OptionField(ExtendedTable::FIELD_ID, $connection->getName());
     $field->setIsMultiple(true);
     $cell->appendToClass('action');
     $cell->setValue($field->getHtml());
 }
 /**
  * Decorates the cell with an option field for the table actions
  * @param zibo\library\html\table\Cell $cell Cell which holds the data object
  * @param zibo\library\html\table\Row $row Row of the cell
  * @param integer $rowNumber Current row number
  * @param array $remainingValues Array with the values of the remaining rows of the table
  * @return null
  */
 public function decorate(Cell $cell, Row $row, $rowNumber, array $values)
 {
     $data = $cell->getValue();
     if (!is_object($data)) {
         $cell->setValue('');
         return;
     }
     $field = new OptionField(ExtendedTable::FIELD_ID, $data->id);
     $field->setIsMultiple(true);
     $cell->appendToClass(ActionDecorator::STYLE_ACTION);
     $cell->setValue($field->getHtml());
 }
 /**
  * Decorates the cell with an option field for the table actions
  * @param zibo\library\html\table\Cell $cell Cell which holds the data object
  * @param zibo\library\html\table\Row $row Row of the cell
  * @param integer $rowNumber Current row number
  * @param array $remainingValues Array containing the values of the remaining rows of the table
  * @return null
  */
 public function decorate(Cell $cell, Row $row, $rowNumber, array $remainingValues)
 {
     $modelField = $cell->getValue();
     if (!$modelField instanceof ModelField) {
         $cell->setValue('');
         return;
     }
     $field = new OptionField(ExtendedTable::FIELD_ID, $modelField->getName());
     $field->setIsMultiple(true);
     $cell->appendToClass(ActionDecorator::STYLE_ACTION);
     $cell->setValue($field->getHtml());
 }