當前位置: 首頁>>代碼示例>>PHP>>正文


PHP TWebControl::addAttributesToRender方法代碼示例

本文整理匯總了PHP中TWebControl::addAttributesToRender方法的典型用法代碼示例。如果您正苦於以下問題:PHP TWebControl::addAttributesToRender方法的具體用法?PHP TWebControl::addAttributesToRender怎麽用?PHP TWebControl::addAttributesToRender使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在TWebControl的用法示例。


在下文中一共展示了TWebControl::addAttributesToRender方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: addAttributesToRender

 /**
  * Adds attributes to renderer.
  * @param THtmlWriter the renderer
  * @throws TInvalidDataValueException if default button is not right.
  */
 protected function addAttributesToRender($writer)
 {
     parent::addAttributesToRender($writer);
     if (($butt = $this->getDefaultButton()) !== '') {
         $writer->addAttribute('id', $this->getClientID());
     }
 }
開發者ID:tejdeeps,項目名稱:tejcs.com,代碼行數:12,代碼來源:TPanel.php

示例2: addAttributesToRender

 /**
  * Adds attributes to renderer.
  * @param THtmlWriter the renderer
  * @throws TInvalidDataValueException if associated control cannot be found using the ID
  */
 protected function addAttributesToRender($writer)
 {
     if ($this->_forControl !== '') {
         $writer->addAttribute('for', $this->_forControl);
     }
     parent::addAttributesToRender($writer);
 }
開發者ID:tejdeeps,項目名稱:tejcs.com,代碼行數:12,代碼來源:TLabel.php

示例3: 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

示例4: addAttributesToRender

 /**
  * Adds attributes to renderer.
  * @param THtmlWriter the renderer
  * @throws TInvalidDataValueException if default button is not right.
  */
 protected function addAttributesToRender($writer)
 {
     parent::addAttributesToRender($writer);
     if (($butt = $this->getDefaultButton()) !== '') {
         if (($button = $this->findControl($butt)) === null) {
             throw new TInvalidDataValueException('panel_defaultbutton_invalid', $butt);
         } else {
             $writer->addAttribute('id', $this->getClientID());
             $this->getPage()->getClientScript()->registerDefaultButton($this, $button);
         }
     }
 }
開發者ID:BackupTheBerlios,項目名稱:horux-svn,代碼行數:17,代碼來源:TPanel.php

示例5: addAttributesToRender

 /**
  * Sets name attribute to the unique ID of the control.
  * This method overrides the parent implementation with additional file update control specific attributes.
  * @param THtmlWriter the writer used for the rendering purpose
  */
 protected function addAttributesToRender($writer)
 {
     $this->getPage()->ensureRenderInForm($this);
     parent::addAttributesToRender($writer);
     $writer->addAttribute('type', 'file');
     $writer->addAttribute('name', $this->getUniqueID());
     $isEnabled = $this->getEnabled(true);
     if (!$isEnabled && $this->getEnabled()) {
         // in this case parent will not render 'disabled'
         $writer->addAttribute('disabled', 'disabled');
     }
 }
開發者ID:BackupTheBerlios,項目名稱:horux-svn,代碼行數:17,代碼來源:TFileUpload.php

示例6: addAttributesToRender

 /**
  * Adds attributes related to a hyperlink element to renderer.
  * @param THtmlWriter the writer used for the rendering purpose
  */
 protected function addAttributesToRender($writer)
 {
     $isEnabled = $this->getEnabled(true);
     if ($this->getEnabled() && !$isEnabled) {
         $writer->addAttribute('disabled', 'disabled');
     }
     parent::addAttributesToRender($writer);
     if (($url = $this->getNavigateUrl()) !== '' && $isEnabled) {
         $writer->addAttribute('href', $url);
     }
     if (($target = $this->getTarget()) !== '') {
         $writer->addAttribute('target', $target);
     }
 }
開發者ID:Nurudeen,項目名稱:prado,代碼行數:18,代碼來源:THyperLink.php

示例7: 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

示例8: addAttributesToRender

 /**
  * Adds attributes to renderer.
  * @param THtmlWriter the renderer
  */
 protected function addAttributesToRender($writer)
 {
     parent::addAttributesToRender($writer);
     if (($colspan = $this->getColumnSpan()) > 0) {
         $writer->addAttribute('colspan', "{$colspan}");
     }
     if (($rowspan = $this->getRowSpan()) > 0) {
         $writer->addAttribute('rowspan', "{$rowspan}");
     }
 }
開發者ID:BackupTheBerlios,項目名稱:horux-svn,代碼行數:14,代碼來源:TTableCell.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);
     $writer->addAttribute('id', $this->getClientID());
     // We call parent implementation here because some attributes
     // may be overwritten in the following
     parent::addAttributesToRender($writer);
     if ($this->getEnabled(true) && $this->getEnableClientScript()) {
         $this->renderLinkButtonHref($writer);
         $this->renderClientControlScript($writer);
     } else {
         if ($this->getEnabled()) {
             // in this case, parent will not render 'disabled'
             $writer->addAttribute('disabled', 'disabled');
         }
     }
 }
開發者ID:BackupTheBerlios,項目名稱:horux-svn,代碼行數:23,代碼來源:TLinkButton.php

示例10: addAttributesToRender

 /**
  * Adds attributes to renderer.
  * @param THtmlWriter the renderer
  */
 protected function addAttributesToRender($writer)
 {
     $writer->addAttribute('class', $this->Parent->getPageCssClass());
     $writer->addAttribute('id', $this->ClientID);
     $style = ($w = $this->getWidth()) !== '' ? 'width:' . $w . ';' : '';
     $style .= ($h = $this->getHeight()) !== '' ? 'height:' . $h . ';' : '';
     $style .= !$this->Parent->isDefault($this->ClientID) ? 'display:none;' : '';
     if ($style !== '') {
         $writer->addAttribute('style', $style);
     }
     parent::addAttributesToRender($writer);
 }
開發者ID:quantrocket,項目名稱:planlogiq,代碼行數:16,代碼來源:YTabPanel.php

示例11: addAttributesToRender

 protected function addAttributesToRender($writer)
 {
     $display = $this->getDisplay();
     $visible = $this->getEnabled(true) && count($this->getErrorMessages()) > 0;
     if (!$visible) {
         if ($display === TValidationSummaryDisplayStyle::None || $display === TValidationSummaryDisplayStyle::Dynamic) {
             $writer->addStyleAttribute('display', 'none');
         } else {
             $writer->addStyleAttribute('visibility', 'hidden');
         }
     }
     $writer->addAttribute('id', $this->getClientID());
     parent::addAttributesToRender($writer);
 }
開發者ID:quantrocket,項目名稱:planlogiq,代碼行數:14,代碼來源:TValidationSummary.php

示例12: 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)
 {
     $writer->addAttribute('type', 'text/javascript');
     $writer->addAttribute('src', $this->getClientScriptUrl());
     parent::addAttributesToRender($writer);
 }
開發者ID:BackupTheBerlios,項目名稱:horux-svn,代碼行數:11,代碼來源:TClientScriptLoader.php

示例13: addAttributesToRender

 /**
  * Attach JavaScript helpers if this control has other controls.
  * 
  * @see addAttributesToRender()
  */
 protected function addAttributesToRender($writer)
 {
     if ($this->Controls->Count > 1 && $this->_expand) {
         $writer->addAttribute('class', 'colapse');
     }
     parent::addAttributesToRender($writer);
 }
開發者ID:quantrocket,項目名稱:planlogiq,代碼行數:12,代碼來源:JzlTreeControl.php

示例14: addAttributesToRender

 /**
  * Adds attribute name-value pairs to renderer.
  * This method overrides the parent implementation with additional TKeyboard specific attributes.
  * @param THtmlWriter the writer used for the rendering purpose
  */
 protected function addAttributesToRender($writer)
 {
     parent::addAttributesToRender($writer);
     if ($this->getPage()->getClientSupportsJavaScript()) {
         $writer->addAttribute('id', $this->getClientID());
     }
 }
開發者ID:quantrocket,項目名稱:planlogiq,代碼行數:12,代碼來源:TKeyboard.php

示例15: addAttributesToRender

 /**
  * Adds attributes to renderer.
  * @param THtmlWriter the renderer
  * @throws TInvalidDataValueException if default button is not right.
  */
 protected function addAttributesToRender($writer)
 {
     $this->setCssClass('weekScheduler_container');
     parent::addAttributesToRender($writer);
 }
開發者ID:BackupTheBerlios,項目名稱:horux-svn,代碼行數:10,代碼來源:XWeekPlanner.php


注:本文中的TWebControl::addAttributesToRender方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。