Ejemplo 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);
 }
Ejemplo n.º 2
0
 /**
  * Adds attributes to renderer. Calls parent implementation and renders the
  * client control scripts.
  * @param THtmlWriter the renderer
  */
 protected function addAttributesToRender($writer)
 {
     $display = $this->getDisplay();
     $visible = $this->getEnabled(true) && !$this->getIsValid();
     if ($display === TValidatorDisplayStyle::None || !$visible && $display === TValidatorDisplayStyle::Dynamic) {
         $writer->addStyleAttribute('display', 'none');
     } else {
         if (!$visible) {
             $writer->addStyleAttribute('visibility', 'hidden');
         }
     }
     $writer->addAttribute('id', $this->getClientID());
     parent::addAttributesToRender($writer);
     $this->renderClientControlScript($writer);
 }