/** * Adds attribute name-value pairs to renderer. * This overrides the parent implementation with additional imagemap specific attributes. * @param THtmlWriter the writer used for the rendering purpose */ protected function addAttributesToRender($writer) { parent::addAttributesToRender($writer); if ($this->getHotSpots()->getCount() > 0) { $writer->addAttribute('usemap', '#' . self::MAP_NAME_PREFIX . $this->getClientID()); $writer->addAttribute('id', $this->getUniqueID()); } if ($this->getEnabled() && !$this->getEnabled(true)) { $writer->addAttribute('disabled', 'disabled'); } }
/** * Adds attribute name-value pairs to renderer. * This overrides the parent implementation with additional button specific attributes. * @param THtmlWriter the writer used for the rendering purpose */ protected function addAttributesToRender($writer) { $page = $this->getPage(); $page->ensureRenderInForm($this); $writer->addAttribute('type', 'image'); if (($uniqueID = $this->getUniqueID()) !== '') { $writer->addAttribute('name', $uniqueID); } if ($this->getEnabled(true)) { if ($this->getEnableClientScript() && $this->needPostBackScript()) { $this->renderClientControlScript($writer); } } else { if ($this->getEnabled()) { // in this case, parent will not render 'disabled' $writer->addAttribute('disabled', 'disabled'); } } parent::addAttributesToRender($writer); }