/** * 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 ($this->fileBrowser->isDirectory($file)) { $cell->setValue(''); return; } $extension = $file->getExtension(); if (array_key_exists($extension, $this->extensions)) { parent::decorate($cell, $row, $rowNumber, $remainingValues); } else { $cell->setValue(''); } }
/** * Constructs a new rename action decorator * @param string $action The URL to the rename action * @return null */ public function __construct($action) { parent::__construct($action, self::TRANSLATION_RENAME); }