/** * Decorates the cell with a order handle for the category * @param zibo\library\html\table\Cell $cell * @param zibo\library\html\table\Row $row * @param integer $rowNumber * @param array $remainingValues * @return null */ public function decorate(Cell $cell, Row $row, $rowNumber, array $remainingValues) { $data = $cell->getValue(); $row->setId('data_' . $data->id); $cell->appendToClass('action'); $image = new Image(self::IMAGE_HANDLE); $image->appendToClass('handle'); $cell->setValue($image->getHtml()); }
/** * Decorates the cell * @param zibo\library\html\table\Cell $cell Cell of the value to decorate * @param zibo\library\html\table\Row $row Row containing the cell * @param int $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) { $field = $cell->getValue(); if (!$field instanceof ModelField) { return; } $row->setId('field_' . $field->getName()); $cell->appendToClass('action'); $image = new Image(self::IMAGE_HANDLE); $image->appendToClass('handle'); $cell->setValue($image->getHtml()); }