当前位置: 首页>>代码示例>>PHP>>正文


PHP TWebControl类代码示例

本文整理汇总了PHP中TWebControl的典型用法代码示例。如果您正苦于以下问题:PHP TWebControl类的具体用法?PHP TWebControl怎么用?PHP TWebControl使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了TWebControl类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: copyBaseAttributes

 /**
  * Copies basic control attributes from another control.
  * Properties including AccessKey, ToolTip, TabIndex, Enabled
  * and Attributes are copied.
  * @param TWebControl source control
  */
 public function copyBaseAttributes(TWebControl $control)
 {
     $this->setAccessKey($control->getAccessKey());
     $this->setToolTip($control->getToolTip());
     $this->setTabIndex($control->getTabIndex());
     if (!$control->getEnabled()) {
         $this->setEnabled(false);
     }
     if ($control->getHasAttributes()) {
         $this->getAttributes()->copyFrom($control->getAttributes());
     }
 }
开发者ID:quantrocket,项目名称:planlogiq,代码行数:18,代码来源:TWebControl.php

示例2: renderRepeater

 /**
  * Renders the repeated items.
  * @param THtmlWriter writer for the rendering purpose
  * @param IRepeatInfoUser repeat information user
  */
 public function renderRepeater($writer, IRepeatInfoUser $user)
 {
     if ($this->_repeatLayout === TRepeatLayout::Table) {
         $control = new TTable();
         if ($this->_caption !== '') {
             $control->setCaption($this->_caption);
             $control->setCaptionAlign($this->_captionAlign);
         }
     } else {
         if ($this->_repeatLayout === TRepeatLayout::Raw) {
             $this->renderRawContents($writer, $user);
             return;
         } else {
             $control = new TWebControl();
         }
     }
     $control->setID($user->getClientID());
     $control->copyBaseAttributes($user);
     if ($user->getHasStyle()) {
         $control->getStyle()->copyFrom($user->getStyle());
     }
     $control->renderBeginTag($writer);
     $writer->writeLine();
     if ($this->_repeatDirection === TRepeatDirection::Vertical) {
         $this->renderVerticalContents($writer, $user);
     } else {
         $this->renderHorizontalContents($writer, $user);
     }
     $control->renderEndTag($writer);
 }
开发者ID:bailey-ann,项目名称:stringtools,代码行数:35,代码来源:TRepeatInfo.php

示例3: addAttributesToRender

 /**
  * Ensure that the ID attribute is rendered and registers the javascript code
  * for initializing the active control.
  */
 protected function addAttributesToRender($writer)
 {
     //calls the TWebControl to avoid rendering other attribute normally render for a textbox.
     TWebControl::addAttributesToRender($writer);
     $writer->addAttribute('id', $this->getLabelClientID());
     $this->getActiveControl()->registerCallbackClientScript($this->getClientClassName(), $this->getPostBackOptions());
 }
开发者ID:Nurudeen,项目名称:prado,代码行数:11,代码来源:TInPlaceTextBox.php

示例4: renderContents

 /**
  * 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);
     }
 }
开发者ID:tejdeeps,项目名称:tejcs.com,代码行数:12,代码来源:TLabel.php

示例5: renderContents

 /**
  * 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()) {
         $textWriter = new TTextWriter();
         parent::renderContents(new THtmlWriter($textWriter));
         $text = $textWriter->flush();
     }
     if ($text !== '') {
         $writer->write($this->processText($text));
     }
 }
开发者ID:BackupTheBerlios,项目名称:horux-svn,代码行数:17,代码来源:TTextProcessor.php

示例6: renderContents

 /**
  * 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));
     }
 }
开发者ID:Nurudeen,项目名称:prado,代码行数:17,代码来源:TTextProcessor.php

示例7: addAttributesToRender

 /**
  * Adds attributes related to an HTML image element to renderer.
  * @param THtmlWriter the writer used for the rendering purpose
  */
 protected function addAttributesToRender($writer)
 {
     $writer->addAttribute('src', $this->getImageUrl());
     $writer->addAttribute('alt', $this->getAlternateText());
     if (($desc = $this->getDescriptionUrl()) !== '') {
         $writer->addAttribute('longdesc', $desc);
     }
     if (($align = $this->getImageAlign()) !== '') {
         $writer->addAttribute('align', $align);
     }
     parent::addAttributesToRender($writer);
 }
开发者ID:BackupTheBerlios,项目名称:horux-svn,代码行数:16,代码来源:TImage.php

示例8: renderContents

 /**
  * 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);
     }
 }
开发者ID:Nurudeen,项目名称:prado,代码行数:20,代码来源:THyperLink.php

示例9: addAttributesToRender

 /**
  * Adds attribute name-value pairs to renderer.
  * This overrides the parent implementation with additional button specific attributes.
  * @param THtmlWriter the writer used for the rendering purpose
  */
 protected function addAttributesToRender($writer)
 {
     $page = $this->getPage();
     $page->ensureRenderInForm($this);
     if (($uniqueID = $this->getUniqueID()) !== '') {
         $writer->addAttribute('name', $uniqueID);
     }
     if ($this->getEnabled(true)) {
         if ($this->getEnableClientScript() && $this->needPostBackScript()) {
             $this->renderClientControlScript($writer);
         }
     } else {
         if ($this->getEnabled()) {
             // in this case, parent will not render 'disabled'
             $writer->addAttribute('disabled', 'disabled');
         }
     }
     parent::addAttributesToRender($writer);
 }
开发者ID:silotester,项目名称:silo,代码行数:24,代码来源:TCustomButton.php

示例10: render

 /**
  * 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);
     }
 }
开发者ID:quantrocket,项目名称:planlogiq,代码行数:12,代码来源:TPager.php

示例11: renderContents

 public function renderContents($writer)
 {
     parent::renderContents($writer);
 }
开发者ID:quantrocket,项目名称:planlogiq,代码行数:4,代码来源:PFGoogleChart.php

示例12: onInit

 /**
  * Creates the child controls of the wizard.
  * This method overrides the parent implementation.
  * @param TEventParameter event parameter
  */
 public function onInit($param)
 {
     parent::onInit($param);
     $this->ensureChildControls();
     $this->setEnsureId(true);
     if ($this->getActiveStepIndex() < 0 && $this->getWizardSteps()->getCount() > 0) {
         $this->setActiveStepIndex(0);
     }
 }
开发者ID:tejdeeps,项目名称:tejcs.com,代码行数:14,代码来源:TWizard.php

示例13: renderBody

 /**
  * Renders the body content of this table.
  * @return string the rendering result
  */
 protected function renderBody()
 {
     return "\n" . parent::renderBody() . "\n";
 }
开发者ID:BackupTheBerlios,项目名称:php5cms-svn,代码行数:8,代码来源:TTable.php

示例14: renderBeginTag

 /**
  * Renders the openning tag for the table control which will render table caption if present.
  * @param THtmlWriter the writer used for the rendering purpose
  */
 public function renderBeginTag($writer)
 {
     parent::renderBeginTag($writer);
     if (($caption = $this->getCaption()) !== '') {
         if (($align = $this->getCaptionAlign()) !== TTableCaptionAlign::NotSet) {
             $writer->addAttribute('align', strtolower($align));
         }
         $writer->renderBeginTag('caption');
         $writer->write($caption);
         $writer->renderEndTag();
     }
 }
开发者ID:BackupTheBerlios,项目名称:horux-svn,代码行数:16,代码来源:TTable.php

示例15: onPreRender

 /**
  * Registers the checkbox to receive postback data during postback.
  * This is necessary because a checkbox if unchecked, when postback,
  * does not have direct mapping between post data and the checkbox name.
  *
  * This method overrides the parent implementation and is invoked before render.
  * @param mixed event parameter
  */
 public function onPreRender($param)
 {
     parent::onPreRender($param);
     if ($this->getEnabled(true)) {
         $this->getPage()->registerRequiresPostData($this);
     }
 }
开发者ID:bailey-ann,项目名称:stringtools,代码行数:15,代码来源:TCheckBox.php


注:本文中的TWebControl类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。