/** * Decorates a table cell by setting an anchor to the cell based on the cell's value * @param zibo\library\html\table\Cell $cell Cell to decorate * @param zibo\library\html\table\Row $row Row which will contain the cell * @param int $rowNumber Number of the row in the table * @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) { $cell->appendToClass(self::CLASS_ACTION); $file = $cell->getValue(); if (!$file instanceof File) { $cell->setValue(''); return; } parent::decorate($cell, $row, $rowNumber, $remainingValues); }
/** * Constructs a new anchor decorator with confirmation message * @param string $href Base href attribute for the anchor * @param string $message The confirmation message * @return null */ public function __construct($href, $message = null) { parent::__construct($href); $this->message = $message; }