/** * Decorates the cell with the action for the value of the cell * @param zibo\library\html\table\Cell $cell Cell to decorate * @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) { $this->willDisplay = true; $this->isDisabled = false; $cell->appendToClass(self::STYLE_ACTION); $value = $cell->getValue(); parent::decorate($cell, $row, $rowNumber, $remainingValues); if (!$this->willDisplay) { $cell->setValue(''); return; } if (!$this->isDisabled) { return; } $label = $this->getLabelFromValue($value); $cell->setValue($label); }
/** * Constructs a new module decorator * @param string $action URL where the anchor should point * @return null */ public function __construct($action) { parent::__construct($action, self::TRANSLATION_CONFIRM); $this->translator = I18n::getInstance()->getTranslator(); $this->label = $this->translator->translate(self::TRANSLATION_REMOVE); }