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


PHP QControl::RenderHtmlAttributes方法代碼示例

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


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

示例1: RenderHtmlAttributes

 /**
  * Render HTML attributes for the purpose of drawing the tag. Text objects have a number of parameters specific
  * to them, some of which we use for validation, and some of which are dual purpose.
  * We render those here, rather than setting the attributes when those are set.
  *
  * @param null $attributeOverrides
  * @param null $styleOverrides
  *
  * @return string|void
  */
 public function RenderHtmlAttributes($attributeOverrides = null, $styleOverrides = null)
 {
     if ($this->intMaxLength) {
         $attributeOverrides['maxlength'] = $this->intMaxLength;
     }
     if ($this->strTextMode == QTextMode::MultiLine) {
         if ($this->intColumns) {
             $attributeOverrides['cols'] = $this->intColumns;
         }
         if ($this->intRows) {
             $attributeOverrides['rows'] = $this->intRows;
         }
         //if (!$this->blnWrap) {
         /**
          * $strToReturn .= 'wrap="off" '; Note that this is not standard HTML5 and not supported by all browsers
          * In fact, HTML5 has completely changed its meaning to mean whether the text itself has embedded
          * hard returns inserted when the textarea wraps. Deprecating. We will have to wait for another solution.
          */
         //}
     } else {
         if ($this->intColumns) {
             $attributeOverrides['size'] = $this->intColumns;
         }
         $typeStr = $this->strTextMode ? $this->strTextMode : 'text';
         $attributeOverrides['type'] = $typeStr;
     }
     if (strlen($this->strPlaceholder) > 0) {
         $attributeOverrides['placeholder'] = $this->strPlaceholder;
     }
     return parent::RenderHtmlAttributes($attributeOverrides, $styleOverrides);
 }
開發者ID:vaibhav-kaushal,項目名稱:qc-framework,代碼行數:41,代碼來源:QTextBoxBase.class.php


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