render() public method

This method overrides the parent implementation by replacing it with the following sequence: - {@link renderBeginTag} - {@link renderContents} - {@link renderEndTag}
public render ( $writer )
Beispiel #1
0
 /**
  * Renders the label.
  * It overrides the parent implementation by checking if an associated
  * control is visible or not. If not, the label will not be rendered.
  * @param THtmlWriter writer
  */
 public function render($writer)
 {
     if (($aid = $this->getForControl()) !== '') {
         if ($control = $this->findControl($aid)) {
             if ($control->getVisible(true)) {
                 $this->_forControl = $control->getClientID();
                 parent::render($writer);
             }
         } else {
             throw new TInvalidDataValueException('label_associatedcontrol_invalid', $aid);
         }
     } else {
         parent::render($writer);
     }
 }
Beispiel #2
0
 public function render($writer)
 {
     $this->registerClientScript();
     parent::render($writer);
 }
Beispiel #3
0
 public function render($writer)
 {
     if ($this->getHasPreRendered()) {
         $this->setDisplay($this->getPageCount() == 1 ? TDisplayStyle::None : TDisplayStyle::Dynamic);
         TWebControl::render($writer);
         if ($this->getActiveControl()->canUpdateClientSide()) {
             $this->getPage()->getCallbackClient()->replaceContent($this, $writer);
         }
     } else {
         $this->getPage()->getAdapter()->registerControlToRender($this, $writer);
     }
 }
Beispiel #4
0
 /**
  * Renders the control.
  * The method overrides the parent implementation by rendering
  * the pager only when there are two or more pages.
  * @param THtmlWriter the writer
  */
 public function render($writer)
 {
     if ($this->_pageCount > 1) {
         parent::render($writer);
     }
 }
Beispiel #5
0
 public function render($writer)
 {
     parent::render($writer);
     if (($butt = $this->getDefaultButton()) !== '') {
         if (($button = $this->findControl($butt)) === null) {
             throw new TInvalidDataValueException('panel_defaultbutton_invalid', $butt);
         } else {
             $this->getPage()->getClientScript()->registerDefaultButton($this, $button);
         }
     }
 }