renderContents() public method

By default, child controls and text strings will be rendered. You can override this method to provide customized content rendering.
public renderContents ( $writer )
示例#1
0
 /**
  * Renders the body content of the label.
  * @param THtmlWriter the renderer
  */
 public function renderContents($writer)
 {
     if (($text = $this->getText()) === '') {
         parent::renderContents($writer);
     } else {
         $writer->write($text);
     }
 }
示例#2
0
 /**
  * Renders body content.
  * This method overrides the parent implementation by replacing
  * the body content with the processed text content.
  * @param THtmlWriter writer
  */
 public function renderContents($writer)
 {
     if (($text = $this->getText()) === '' && $this->getHasControls()) {
         $htmlWriter = Prado::createComponent($this->GetResponse()->getHtmlWriterType(), new TTextWriter());
         parent::renderContents($htmlWriter);
         $text = $htmlWriter->flush();
     }
     if ($text !== '') {
         $writer->write($this->processText($text));
     }
 }
示例#3
0
 /**
  * Renders the body content of the hyperlink.
  * @param THtmlWriter the writer for rendering
  */
 public function renderContents($writer)
 {
     if (($imageUrl = $this->getImageUrl()) === '') {
         if (($text = $this->getText()) !== '') {
             $writer->write(THttpUtility::htmlEncode($text));
         } else {
             if ($this->getHasControls()) {
                 parent::renderContents($writer);
             } else {
                 $writer->write(THttpUtility::htmlEncode($this->getNavigateUrl()));
             }
         }
     } else {
         $this->createImage($imageUrl)->renderControl($writer);
     }
 }
示例#4
0
 /**
  * Renders body contents of the tab view.
  * @param THtmlWriter the writer used for the rendering purpose.
  */
 public function renderContents($writer)
 {
     if (($text = $this->getText()) !== '') {
         $writer->write($text);
     } else {
         if ($this->getHasControls()) {
             parent::renderContents($writer);
         }
     }
 }
示例#5
0
 /**
  * Renders the body content enclosed between the control tag.
  * This overrides the parent implementation with nothing to be rendered for input tags,
  * button tags are rendered normally.
  * @param THtmlWriter the writer used for the rendering purpose
  */
 public function renderContents($writer)
 {
     if ($this->getButtonTag() === TButtonTag::Button) {
         parent::renderContents($writer);
     }
 }