addAttributesToRender() protected method

Adds attributes to renderer.
protected addAttributesToRender ( $writer )
Esempio n. 1
0
 /**
  * Adds attributes to renderer.
  * @param THtmlWriter the renderer
  */
 protected function addAttributesToRender($writer)
 {
     parent::addAttributesToRender($writer);
     if (($scope = $this->getScope()) !== TTableHeaderScope::NotSet) {
         $writer->addAttribute('scope', $scope === TTableHeaderScope::Row ? 'row' : 'col');
     }
     if (($text = $this->getAbbreviatedText()) !== '') {
         $writer->addAttribute('abbr', $text);
     }
     if (($text = $this->getCategoryText()) !== '') {
         $writer->addAttribute('axis', $text);
     }
 }
Esempio n. 2
0
 /**
  * Ensure that the ID attribute is rendered and registers the javascript code
  * for initializing the active control if the event handler for the
  * {@link onCellSelected OnCellSelected} event is set.
  * @param THtmlWriter the writer responsible for rendering
  */
 protected function addAttributesToRender($writer)
 {
     parent::addAttributesToRender($writer);
     $writer->addAttribute('id', $this->getClientID());
     if ($this->hasEventHandler('OnCellSelected')) {
         $this->getActiveControl()->registerCallbackClientScript($this->getClientClassName(), $this->getPostBackOptions());
     }
 }