當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。