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


PHP TWebControl::getAttributesToRender方法代码示例

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


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

示例1: getAttributesToRender

 /**
  * Returns the attributes to be rendered.
  * @return ArrayObject attributes to be rendered
  */
 protected function getAttributesToRender()
 {
     $attributes = parent::getAttributesToRender();
     unset($attributes['id']);
     return $attributes;
 }
开发者ID:BackupTheBerlios,项目名称:php5cms-svn,代码行数:10,代码来源:TDataListItem.php

示例2: getAttributesToRender

 /**
  * This overrides the parent implementation by rendering more THyperLink-specific attributes.
  * @return ArrayObject the attributes to be rendered
  */
 protected function getAttributesToRender()
 {
     $attr = parent::getAttributesToRender();
     $href = $this->getNavigateUrl();
     if (strlen($href) && $this->isEnabled()) {
         $attr['href'] = pradoEncodeData($href);
     }
     $target = $this->getTarget();
     if (strlen($target)) {
         $attr['target'] = $target;
     }
     return $attr;
 }
开发者ID:BackupTheBerlios,项目名称:php5cms-svn,代码行数:17,代码来源:THyperLink.php

示例3: getAttributesToRender

 /**
  * This overrides the parent implementation by rendering more TLinkButton-specific attributes.
  * @return ArrayObject the attributes to be rendered
  */
 protected function getAttributesToRender()
 {
     $attr = parent::getAttributesToRender();
     if ($this->isEnabled()) {
         $page = $this->getPage();
         $postBack = $page->getPostBackClientEvent($this, '');
         if ($this->causesValidation() && $this->Page->isEndScriptRegistered('TValidator')) {
             $script = "Prado.Validation.AddTarget('{$this->ClientID}');";
             $this->Page->registerEndScript($this->ClientID . 'target', $script);
         }
         $attr['href'] = "javascript:{$postBack}";
     }
     return $attr;
 }
开发者ID:BackupTheBerlios,项目名称:php5cms-svn,代码行数:18,代码来源:TLinkButton.php

示例4: getAttributesToRender

 /**
  * Returns the attributes to be rendered.
  * @return ArrayObject attributes to be rendered
  */
 protected function getAttributesToRender()
 {
     $url = $this->getBackImageUrl();
     if (strlen($url)) {
         $this->setStyle(array('background-image' => "url({$url})"));
     }
     $attributes = parent::getAttributesToRender();
     if (($cellSpacing = $this->getCellSpacing()) >= 0) {
         $attributes['cellspacing'] = $cellSpacing;
     } else {
         $attributes['cellspacing'] = '0';
     }
     if (($cellPadding = $this->getCellPadding()) >= 0) {
         $attributes['cellpadding'] = $cellPadding;
     } else {
         $attributes['cellpadding'] = '0';
     }
     $grid = $this->getGridLines();
     if ($grid != 'None') {
         if ($grid == 'Horizontal') {
             $attributes['rules'] = 'rows';
         } else {
             if ($grid == 'Both') {
                 $attributes['rules'] = 'all';
             } else {
                 if ($grid == 'Vertical') {
                     $attributes['rules'] = 'cols';
                 }
             }
         }
         if (!isset($attributes['border'])) {
             $attributes['border'] = '1';
         }
     }
     $align = $this->getHorizontalAlign();
     if ($align != 'NotSet') {
         $attributes['align'] = $align;
     }
     return $attributes;
 }
开发者ID:BackupTheBerlios,项目名称:php5cms-svn,代码行数:44,代码来源:TTable.php

示例5: getAttributesToRender

 /**
  * Returns the attributes to be rendered.
  * This method overrides the parent's implementation.
  * @return ArrayObject attributes to be rendered
  */
 protected function getAttributesToRender()
 {
     $attributes = parent::getAttributesToRender();
     $attributes['name'] = $this->getUniqueID();
     if ($this->isReadOnly()) {
         $attributes['readonly'] = 'readonly';
     }
     if ($this->isAutoPostBack()) {
         $page = $this->getPage();
         $script = $page->getPostBackClientEvent($this, '');
         $attributes['onchange'] = "javascript:{$script}";
     }
     $type = $this->getTextMode();
     if ($type === 'MultiLine') {
         if (($rows = $this->getRows()) > 0) {
             $attributes['rows'] = $rows;
         }
         if (($cols = $this->getColumns()) > 0) {
             $attributes['cols'] = $cols;
         }
         if (!$this->isWrap()) {
             $attributes['wrap'] = 'off';
         }
     } else {
         $attributes['type'] = $type === 'Password' ? 'password' : 'text';
         if (($cols = $this->getColumns()) > 0) {
             $attributes['size'] = $cols;
         }
         if (($maxLength = $this->getMaxLength()) > 0) {
             $attributes['maxlength'] = $maxLength;
         }
         $attributes['value'] = $this->isEncodeText() ? pradoEncodeData($this->getText()) : $this->getText();
     }
     return $attributes;
 }
开发者ID:BackupTheBerlios,项目名称:php5cms-svn,代码行数:40,代码来源:TTextBox.php

示例6: getAttributesToRender

 /**
  * This overrides the parent implementation by rendering more TWebControl-specific attributes.
  * @return ArrayObject the attributes to be rendered
  */
 protected function getAttributesToRender()
 {
     $attributes = parent::getAttributesToRender();
     if ($this->getGenerateCss()) {
         unset($attributes['style']);
     }
     if (!$this->isEnabled()) {
         $attributes['disabled'] = "disabled";
     }
     $tabIndex = $this->getTabIndex();
     if (!empty($tabIndex)) {
         $attributes['tabindex'] = $tabIndex;
     }
     $toolTip = $this->getToolTip();
     if (strlen($toolTip)) {
         $attributes['title'] = $toolTip;
     }
     $accessKey = $this->getAccessKey();
     if (strlen($accessKey)) {
         $attributes['accesskey'] = $accessKey;
     }
     $cssClass = $this->getCssClass();
     if (strlen($cssClass)) {
         $attributes['class'] = $cssClass;
     }
     return $attributes;
 }
开发者ID:BackupTheBerlios,项目名称:flushcms,代码行数:31,代码来源:TCssDropDownMenu.php

示例7: getAttributesToRender

 /**
  * Returns the attributes to be rendered.
  * This method overrides the parent's implementation.
  * @return ArrayObject attributes to be rendered
  */
 protected function getAttributesToRender()
 {
     $attributes = parent::getAttributesToRender();
     $attributes["id"] = $this->getClientID();
     $attributes["type"] = "checkbox";
     $attributes["name"] = $this->getClientID();
     if ($this->isChecked()) {
         $attributes["checked"] = "checked";
     }
     if (!$this->isEnabled()) {
         $attributes["disabled"] = "disabled";
     }
     if ($this->isAutoPostBack()) {
         $page = $this->getPage();
         $script = $page->getPostBackClientEvent($this, '');
         $attributes["onclick"] = "javascript:{$script}";
     }
     $accessKey = $this->getAccessKey();
     if (strlen($accessKey)) {
         $attributes["acesskey"] = $accessKey;
     }
     $tabIndex = $this->getTabIndex();
     if (!empty($tabIndex)) {
         $attributes["tabindex"] = $tabIndex;
     }
     return $attributes;
 }
开发者ID:BackupTheBerlios,项目名称:php5cms-svn,代码行数:32,代码来源:TCheckBox.php

示例8: getAttributesToRender

 /**
  * This overrides the parent implementation by rendering more TImage-specific attributes.
  * @return ArrayObject the attributes to be rendered
  */
 protected function getAttributesToRender()
 {
     $attributes = parent::getAttributesToRender();
     $attributes['src'] = $this->getImageUrl();
     $attributes['border'] = $this->getBorder();
     $attributes['alt'] = $this->isEncodeText() ? pradoEncodeData($this->getAlternateText()) : $this->getAlternateText();
     $align = $this->getImageAlign();
     if (strlen($align)) {
         $attributes['align'] = $align;
     }
     return $attributes;
 }
开发者ID:BackupTheBerlios,项目名称:php5cms-svn,代码行数:16,代码来源:TImage.php

示例9: getAttributesToRender

 /**
  * This overrides the parent implementation by rendering more TButton-specific attributes.
  * @return ArrayObject the attributes to be rendered
  */
 protected function getAttributesToRender()
 {
     $attributes = parent::getAttributesToRender();
     $attributes['type'] = "submit";
     $attributes['name'] = $this->getUniqueID();
     $attributes['value'] = $this->isEncodeText() ? pradoEncodeData($this->getText()) : $this->getText();
     if ($this->causesValidation() && $this->Page->isEndScriptRegistered('TValidator')) {
         $script = "Prado.Validation.AddTarget('{$this->ClientID}');";
         $this->Page->registerEndScript($this->ClientID . 'target', $script);
     }
     return $attributes;
 }
开发者ID:BackupTheBerlios,项目名称:php5cms-svn,代码行数:16,代码来源:TButton.php

示例10: getAttributesToRender

 /**
  * This overrides the parent implementation by rendering the FOR
  * attributes.
  * @return ArrayObject the attributes to be rendered
  */
 protected function getAttributesToRender()
 {
     $attr = parent::getAttributesToRender();
     $forID = $this->getForID();
     $parent = $this->getParent();
     $for = $parent->findObject($forID);
     if (is_null($for)) {
         throw new Exception("Invalid \"For\" attribute in TFormLabel value: {$forID}.");
     } else {
         if ($for instanceof TListControl) {
             if (isset($attr['onclick'])) {
                 $onclick = explode(';', $attr['onclick']);
             }
             $onclick[] = 'document.getElementById(\'' . $for->getClientID() . '\').focus();return false;';
             $attr['onclick'] = implode(';', $onclick);
         }
         $attr['for'] = $for->getClientID();
     }
     return $attr;
 }
开发者ID:BackupTheBerlios,项目名称:php5cms-svn,代码行数:25,代码来源:TFormLabel.php

示例11: getAttributesToRender

 /**
  * Returns the attributes to be rendered.
  * @return ArrayObject attributes to be rendered
  */
 protected function getAttributesToRender()
 {
     $attributes = parent::getAttributesToRender();
     $align = $this->getHorizontalAlign();
     if ($align != 'NotSet') {
         $attributes['align'] = strtolower($align);
     }
     $valign = $this->getVerticalAlign();
     if ($valign != 'NotSet') {
         $attributes['valign'] = strtolower($valign);
     }
     unset($attributes['id']);
     return $attributes;
 }
开发者ID:BackupTheBerlios,项目名称:php5cms-svn,代码行数:18,代码来源:TTableRow.php

示例12: getAttributesToRender

 /**
  * Returns the attributes to be rendered.
  * @return ArrayObject attributes to be rendered
  */
 protected function getAttributesToRender()
 {
     $attributes = parent::getAttributesToRender();
     if (($colspan = $this->getColumnSpan()) > 0) {
         $attributes['colspan'] = $colspan;
     }
     if (($rowspan = $this->getRowSpan()) > 0) {
         $attributes['rowspan'] = $rowspan;
     }
     if (!$this->isWrap()) {
         $attributes['nowrap'] = 'nowrap';
     }
     $align = $this->getHorizontalAlign();
     if ($align != 'NotSet') {
         $attributes['align'] = strtolower($align);
     }
     $valign = $this->getVerticalAlign();
     if ($valign != 'NotSet') {
         $attributes['valign'] = strtolower($valign);
     }
     unset($attributes['id']);
     return $attributes;
 }
开发者ID:BackupTheBerlios,项目名称:php5cms-svn,代码行数:27,代码来源:TTableCell.php

示例13: getAttributesToRender

 /**
  * This overrides the parent implementation by rendering more TPanel-specific attributes.
  * @return ArrayObject the attributes to be rendered
  */
 protected function getAttributesToRender()
 {
     $url = $this->getBackImageUrl();
     if (strlen($url)) {
         $this->setStyle(array('background-image' => "url({$url})"));
     }
     $attributes = parent::getAttributesToRender();
     $align = $this->getHorizontalAlign();
     if (strlen($align)) {
         $attributes['align'] = $align;
     }
     if (!$this->isWrap()) {
         $attributes['nowrap'] = 'nowrap';
     }
     return $attributes;
 }
开发者ID:BackupTheBerlios,项目名称:php5cms-svn,代码行数:20,代码来源:TPanel.php

示例14: getAttributesToRender

 /**
  * This overrides the parent implementation by rendering more TButton-specific attributes.
  * @return ArrayObject the attributes to be rendered
  */
 protected function getAttributesToRender()
 {
     $attributes = parent::getAttributesToRender();
     $attributes['type'] = 'file';
     $attributes['name'] = $this->getUniqueID();
     return $attributes;
 }
开发者ID:BackupTheBerlios,项目名称:php5cms-svn,代码行数:11,代码来源:TFileUpload.php

示例15: getAttributesToRender

 /**
  * This overrides the parent implementation by rendering more TButton-specific attributes.
  * @return ArrayObject the attributes to be rendered
  */
 protected function getAttributesToRender()
 {
     $attributes = parent::getAttributesToRender();
     $attributes['type'] = 'file';
     $attributes['name'] = $this->getUniqueID();
     if (($cols = $this->getColumns()) > 0) {
         $attributes['size'] = $cols;
     }
     return $attributes;
 }
开发者ID:joybinchen,项目名称:svnmanager-1.09,代码行数:14,代码来源:TFileUpload.php


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