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


PHP TextField::__set方法代碼示例

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


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

示例1: __set

 /**
  * Add specific attributes
  *
  * @param string $strKey
  * @param mixed  $varValue
  */
 public function __set($strKey, $varValue)
 {
     switch ($strKey) {
         case 'category':
         case 'bounds':
         case 'componentRestrictions':
         case 'callback':
         case 'use_route_type':
         case 'use_street_number_type':
         case 'use_locality_type':
         case 'use_administrative_area_level_1_type':
         case 'use_country_type':
         case 'use_postal_code_type':
         case 'use_lat_long':
             $this->options[$strKey] = $varValue;
             break;
         case 'use_route':
         case 'use_street_number':
         case 'use_locality':
         case 'use_administrative_area_level_1':
         case 'use_country':
         case 'use_postal_code':
             $this->useFields[substr($strKey, 4)] = $varValue;
             break;
         default:
             parent::__set($strKey, $varValue);
             break;
     }
 }
開發者ID:Fuzzyma,項目名稱:contao-addresspicker,代碼行數:35,代碼來源:AddresspickerField.php

示例2: __set

 /**
  * Make sure we have the correct value
  * @param string
  * @param mixed
  */
 public function __set($strKey, $varValue)
 {
     switch ($strKey) {
         case 'value':
             $this->varValue = Number::create($varValue);
             break;
     }
     parent::__set($strKey, $varValue);
 }
開發者ID:codefog,項目名稱:contao-haste,代碼行數:14,代碼來源:BackendWidget.php

示例3: __set

 /**
  * @param string $strKey
  * @param mixed $varValue
  */
 public function __set($strKey, $varValue)
 {
     switch ($strKey) {
         case 'maxlength':
             if ($varValue > 0) {
                 $this->arrAttributes['maxlength'] = $varValue;
             }
             break;
         case 'mandatory':
             if ($varValue) {
                 $this->arrAttributes['required'] = 'required';
             } else {
                 unset($this->arrAttributes['required']);
             }
             parent::__set($strKey, $varValue);
             break;
         case 'placeholder':
             $this->arrAttributes['placeholder'] = $varValue;
             break;
         default:
             parent::__set($strKey, $varValue);
             break;
     }
 }
開發者ID:craffft,項目名稱:contao-translation-fields,代碼行數:28,代碼來源:TranslationTextField.php

示例4: __set

 /**
  * Add specific attributes
  * @param string
  * @param mixed
  */
 public function __set($strKey, $varValue)
 {
     switch ($strKey) {
         case 'isTag':
             $this->blnSubmitInput = !$varValue;
             break;
         case 'table':
             $this->strTagTable = $varValue;
             break;
         case 'value':
             $this->varValue = implode(",", array_filter(trimsplit(",", $varValue), 'strlen'));
             break;
         case 'maxtags':
             $this->intMaxTags = $varValue;
             break;
         default:
             parent::__set($strKey, $varValue);
             break;
     }
 }
開發者ID:AgentCT,項目名稱:tags,代碼行數:25,代碼來源:TagField.php

示例5: __set

 /**
  * Add specific attributes
  *
  * @param string $strKey
  * @param mixed  $varValue
  */
 public function __set($strKey, $varValue)
 {
     switch ($strKey) {
         case 'format':
         case 'startDate':
         case 'endDate':
         case 'excludeCSS':
         case 'excludeJS':
         case 'autoclose':
         case 'beforeShowDay':
         case 'beforeShowMonth':
         case 'beforeShowYear':
         case 'beforeShowDecade':
         case 'beforeShowCentury':
         case 'calendarWeeks':
         case 'clearBtn':
         case 'container':
         case 'datesDisabled':
         case 'daysOfWeekDisabled':
         case 'daysOfWeekHighlighted':
         case 'defaultViewDate':
         case 'disableTouchKeyboard':
         case 'enableOnReadonly':
         case 'forceParse':
         case 'assumeNearbyYear':
         case 'assumeNearbyYear_number':
         case 'immediateUpdates':
         case 'inputs':
         case 'keyboardNavigation':
         case 'language':
         case 'maxViewMode':
         case 'minViewMode':
         case 'multidate':
         case 'multidate_count':
         case 'multidateSeparator':
         case 'orientation':
         case 'showOnFocus':
         case 'startView':
         case 'templates':
         case 'title':
         case 'todayBtn':
         case 'todayHighlight':
         case 'toggleActive':
         case 'weekStart':
         case 'zIndexOffset':
             $this->options[$strKey] = $varValue;
             break;
         default:
             parent::__set($strKey, $varValue);
             break;
     }
 }
開發者ID:Fuzzyma,項目名稱:contao-bootstrap-datepicker,代碼行數:58,代碼來源:DatepickerField.php


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