/** * 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); }
/** * Constructs a new action decorator * @param string $href Base href attribute for the action * @param string $label Translation key for the label * @param string $message Translation key for the message * @return null */ public function __construct($href, $label, $message = null) { parent::__construct($href, $message); $this->label = $label; $this->translator = I18n::getInstance()->getTranslator(); }