addAttributesToRender() protected method

Adds attributes to renderer.
protected addAttributesToRender ( $writer )
Esempio n. 1
0
 /**
  * Adds attribute id to the renderer.
  * @param THtmlWriter the writer used for the rendering purpose
  */
 protected function addAttributesToRender($writer)
 {
     $writer->addAttribute('id', $this->getClientID());
     parent::addAttributesToRender($writer);
 }
Esempio n. 2
0
 /**
  * Ensure that the ID attribute is rendered and registers the javascript code
  * for initializing the active control.
  */
 protected function addAttributesToRender($writer)
 {
     parent::addAttributesToRender($writer);
     $cs = $this->getPage()->getClientScript();
     if ($this->getGhosting() == TDraggableGhostingOptions::SuperGhosting) {
         $cs->registerPradoScript('dragdropextra');
     } else {
         $cs->registerPradoScript('dragdrop');
     }
     $writer->addAttribute('id', $this->getClientID());
     $options = TJavaScript::encode($this->getPostBackOptions());
     $class = $this->getClientClassName();
     $code = "new {$class}('{$this->getClientId()}', {$options}) ";
     $cs->registerEndScript(sprintf('%08X', crc32($code)), $code);
 }
Esempio n. 3
0
 /**
  * Ensure that the ID attribute is rendered and registers the javascript code
  * for initializing the active control.
  */
 protected function addAttributesToRender($writer)
 {
     parent::addAttributesToRender($writer);
     $writer->addAttribute('id', $this->getClientID());
     $this->getPage()->getClientScript()->registerPradoScript('dragdrop');
     $this->getActiveControl()->registerCallbackClientScript($this->getClientClassName(), $this->getPostBackOptions());
 }