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


PHP Widget::__set方法代码示例

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


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

示例1: __set

 /**
  * Add specific attributes
  *
  * @param string $strKey   The attribute key
  * @param mixed  $varValue The attribute value
  */
 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 'min':
         case 'max':
         case 'step':
         case 'placeholder':
             $this->arrAttributes[$strKey] = $varValue;
             break;
         default:
             parent::__set($strKey, $varValue);
             break;
     }
 }
开发者ID:Mozan,项目名称:core-bundle,代码行数:33,代码来源:FormTextField.php

示例2: __set

 /**
  * Add specific attributes
  * @param string
  * @param mixed
  */
 public function __set($strKey, $varValue)
 {
     switch ($strKey) {
         case 'mSize':
             if ($this->multiple) {
                 $this->arrAttributes['size'] = $varValue;
             }
             break;
         case 'options':
             $this->arrOptions = deserialize($varValue);
             break;
         case 'multiple':
             if (strlen($varValue)) {
                 $this->arrAttributes[$strKey] = 'multiple';
             }
             break;
         case 'mandatory':
             $this->arrConfiguration['mandatory'] = $varValue ? true : false;
             break;
         case 'rgxp':
             break;
         default:
             parent::__set($strKey, $varValue);
             break;
     }
 }
开发者ID:Juuro,项目名称:Dreamapp-Website,代码行数:31,代码来源:FormSelectMenu.php

示例3: __set

 /**
  * Add specific attributes
  * @param string
  * @param mixed
  */
 public function __set($strKey, $varValue)
 {
     switch ($strKey) {
         case 'mSize':
             if ($this->multiple) {
                 $this->arrAttributes['size'] = $varValue;
             }
             break;
         case 'efgLookupOptions':
             $this->import('Formdata');
             $this->arrConfiguration['efgLookupOptions'] = $varValue;
             $arrOptions = $this->Formdata->prepareWidgetOptions($this->arrConfiguration);
             $this->arrOptions = $arrOptions;
             break;
         case 'multiple':
             if (strlen($varValue)) {
                 $this->arrAttributes[$strKey] = 'multiple';
             }
             break;
         case 'mandatory':
             $this->arrConfiguration['mandatory'] = $varValue ? true : false;
             break;
         case 'rgxp':
             break;
         default:
             parent::__set($strKey, $varValue);
             break;
     }
 }
开发者ID:Jobu,项目名称:core,代码行数:34,代码来源:EfgFormLookupSelectMenu.php

示例4: __set

 public function __set($strKey, $varValue)
 {
     switch ($strKey) {
         case 'maxlength':
             $this->arrAttributes[$strKey] = $varValue > 0 ? $varValue : '';
             break;
         case 'mandatory':
             if (VERSION == 2.9 || VERSION == 2.1) {
                 $this->arrConfiguration['mandatory'] = $varValue ? true : false;
             } else {
                 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:heimrichhannot,项目名称:contao-confirmed_email,代码行数:26,代码来源:FormConfirmedEmail.php

示例5: __set

 /**
  * Add specific attributes
  * @param string
  * @param mixed
  */
 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 'rows':
             $this->intRows = $varValue;
             break;
         case 'cols':
             $this->intCols = $varValue;
             break;
         default:
             parent::__set($strKey, $varValue);
             break;
     }
 }
开发者ID:iCodr8,项目名称:core,代码行数:32,代码来源:TextArea.php

示例6: __set

 /**
  * Add specific attributes
  *
  * @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;
         case 'options':
             $this->arrUnits = \StringUtil::deserialize($varValue);
             break;
         default:
             parent::__set($strKey, $varValue);
             break;
     }
 }
开发者ID:contao,项目名称:core-bundle,代码行数:33,代码来源:InputUnit.php

示例7: __set

 /**
  * Add specific attributes
  *
  * @param string $strKey   The attribute name
  * @param mixed  $varValue The attribute value
  */
 public function __set($strKey, $varValue)
 {
     switch ($strKey) {
         case 'singleSRC':
             $this->arrConfiguration['singleSRC'] = $varValue;
             break;
         case 'imageSubmit':
             $this->arrConfiguration['imageSubmit'] = $varValue ? true : false;
             break;
         case 'name':
             $this->arrAttributes['name'] = $varValue;
             break;
         case 'label':
             $this->slabel = $varValue;
             break;
         case 'required':
         case 'mandatory':
         case 'minlength':
         case 'maxlength':
             // Ignore
             break;
         default:
             parent::__set($strKey, $varValue);
             break;
     }
 }
开发者ID:StephenGWills,项目名称:sample-contao-app,代码行数:32,代码来源:FormSubmit.php

示例8: __set

 /**
  * Add specific attributes
  *
  * @param string $strKey
  * @param mixed  $varValue
  */
 public function __set($strKey, $varValue)
 {
     switch ($strKey) {
         case 'mandatory':
             if ($varValue) {
                 $this->arrAttributes['required'] = 'required';
             } else {
                 unset($this->arrAttributes['required']);
             }
             parent::__set($strKey, $varValue);
             break;
         case 'size':
             if ($this->multiple) {
                 $this->arrAttributes['size'] = $varValue;
             }
             break;
         case 'multiple':
             if ($varValue) {
                 $this->arrAttributes['multiple'] = 'multiple';
             }
             break;
         case 'options':
             $this->arrOptions = \StringUtil::deserialize($varValue);
             break;
         default:
             parent::__set($strKey, $varValue);
             break;
     }
 }
开发者ID:contao,项目名称:core-bundle,代码行数:35,代码来源:SelectMenu.php

示例9: __set

 /**
  * Add specific attributes
  * @param string
  * @param mixed
  */
 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;
         case 'size':
             $arrSize = deserialize($varValue);
             $this->intRows = $arrSize[0];
             $this->intCols = $arrSize[1];
             break;
         case 'rows':
             $this->intRows = $varValue;
             break;
         case 'cols':
             $this->intCols = $varValue;
             break;
         default:
             parent::__set($strKey, $varValue);
             break;
     }
 }
开发者ID:rikaix,项目名称:core,代码行数:40,代码来源:FormTextArea.php

示例10: __set

 /**
  * Add specific attributes
  * @param string
  * @param mixed
  */
 public function __set($strKey, $varValue)
 {
     switch ($strKey) {
         case 'maxlength':
             // Do not add as attribute (see #3094)
             $this->arrConfiguration['maxlength'] = $varValue;
             break;
         case 'mandatory':
             if ($varValue) {
                 $this->arrAttributes['required'] = 'required';
             } else {
                 unset($this->arrAttributes['required']);
             }
             parent::__set($strKey, $varValue);
             break;
         case 'fSize':
             if ($varValue > 0) {
                 $this->arrAttributes['size'] = $varValue;
             }
             break;
         default:
             parent::__set($strKey, $varValue);
             break;
     }
 }
开发者ID:rburch,项目名称:core,代码行数:30,代码来源:FormFileUpload.php

示例11: __set

 /**
  * Add specific attributes
  *
  * @param string $strKey   The attribute name
  * @param mixed  $varValue The attribute value
  */
 public function __set($strKey, $varValue)
 {
     switch ($strKey) {
         case 'mandatory':
             if ($varValue) {
                 $this->arrAttributes['required'] = 'required';
             } else {
                 unset($this->arrAttributes['required']);
             }
             parent::__set($strKey, $varValue);
             break;
         case 'mSize':
             if ($this->multiple) {
                 $this->arrAttributes['size'] = $varValue;
             }
             break;
         case 'multiple':
             if ($varValue != '') {
                 $this->arrAttributes['multiple'] = 'multiple';
             }
             break;
         case 'options':
             $this->arrOptions = deserialize($varValue);
             break;
         case 'rgxp':
         case 'minlength':
         case 'maxlength':
             // Ignore
             break;
         default:
             parent::__set($strKey, $varValue);
             break;
     }
 }
开发者ID:Mozan,项目名称:core-bundle,代码行数:40,代码来源:FormSelectMenu.php

示例12: __set

 /**
  * Add specific attributes
  *
  * @param string
  * @param mixed
  */
 public function __set($key, $value)
 {
     switch ($key) {
         default:
             parent::__set($key, $value);
             break;
     }
 }
开发者ID:Ainschy,项目名称:contao-core,代码行数:14,代码来源:WidgetEventchooser.php

示例13: __set

 /**
  * Add specific attributes
  *
  * @param string $strKey
  * @param mixed  $varValue
  */
 public function __set($strKey, $varValue)
 {
     switch ($strKey) {
         case 'options':
             $this->arrOptions = deserialize($varValue);
             break;
         default:
             parent::__set($strKey, $varValue);
             break;
     }
 }
开发者ID:StephenGWills,项目名称:sample-contao-app,代码行数:17,代码来源:CheckBox.php

示例14: __set

 /**
  * Add specific attributes
  * @param string
  * @param mixed
  */
 public function __set($strKey, $varValue)
 {
     switch ($strKey) {
         case 'mandatory':
             $this->arrConfiguration['mandatory'] = $varValue ? true : false;
             break;
         default:
             parent::__set($strKey, $varValue);
             break;
     }
 }
开发者ID:Jobu,项目名称:core,代码行数:16,代码来源:EfgFormImageSelect.php

示例15: __set

 /**
  * Add specific attributes
  * @param string
  * @param mixed
  */
 public function __set($strKey, $varValue)
 {
     switch ($strKey) {
         case 'required':
         case 'mandatory':
             // Is set by default
             break;
         default:
             parent::__set($strKey, $varValue);
             break;
     }
 }
开发者ID:jens-wetzel,项目名称:use2,代码行数:17,代码来源:FormCaptcha.php


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