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


PHP Widget::__get方法代码示例

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


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

示例1: __get

 /**
  * Return a parameter
  *
  * @param string $strKey The parameter key
  *
  * @return mixed The parameter value
  */
 public function __get($strKey)
 {
     if ($strKey == 'options') {
         return $this->arrOptions;
     }
     return parent::__get($strKey);
 }
开发者ID:qzminski,项目名称:contao-core-bundle,代码行数:14,代码来源:FormCheckBox.php

示例2: __get

 /**
  * Return an object property
  *
  * @param string $strKey The property name
  *
  * @return string The property value
  */
 public function __get($strKey)
 {
     switch ($strKey) {
         case 'required':
         case 'mandatory':
             return false;
     }
     return parent::__get($strKey);
 }
开发者ID:heimrichhannot,项目名称:contao-formhybrid,代码行数:16,代码来源:FormReadonlyField.php

示例3: __get

 /**
  * Return a parameter
  * @return string
  * @throws Exception
  */
 public function __get($strKey)
 {
     switch ($strKey) {
         case 'options':
             return $this->arrOptions;
             break;
         default:
             return parent::__get($strKey);
             break;
     }
 }
开发者ID:byteworks-ch,项目名称:contao-efg,代码行数:16,代码来源:EfgFormLookupCheckbox.php

示例4: __get

 /**
  * Return a parameter
  *
  * @param string $strKey The parameter key
  *
  * @return mixed The parameter value
  */
 public function __get($strKey)
 {
     switch ($strKey) {
         case 'value':
             // Hide the Punycode format (see #2750)
             if ($this->rgxp == 'email' || $this->rgxp == 'friendly' || $this->rgxp == 'url') {
                 return \Idna::decode($this->varValue);
             } else {
                 return $this->varValue;
             }
             break;
         case 'type':
             if ($this->hideInput) {
                 return 'password';
             }
             // Use the HTML5 types (see #4138) but not the date, time and datetime types (see #5918)
             switch ($this->rgxp) {
                 case 'digit':
                     // Allow floats (see #7257)
                     if (!isset($this->arrAttributes['step'])) {
                         $this->addAttribute('step', 'any');
                     }
                     // NO break; here
                 // NO break; here
                 case 'natural':
                     return 'number';
                     break;
                 case 'phone':
                     return 'tel';
                     break;
                 case 'email':
                     return 'email';
                     break;
                 case 'url':
                     return 'url';
                     break;
             }
             return 'text';
             break;
         default:
             return parent::__get($strKey);
             break;
     }
 }
开发者ID:Mozan,项目名称:core-bundle,代码行数:51,代码来源:FormTextField.php

示例5: __get

 /**
  * Return a parameter
  *
  * @param string $strKey The parameter key
  *
  * @return mixed The parameter value
  */
 public function __get($strKey)
 {
     switch ($strKey) {
         case 'cols':
             return $this->intCols;
             break;
         case 'rows':
             return $this->intRows;
             break;
         case 'value':
             return specialchars(str_replace('\\n', "\n", $this->varValue));
             break;
         default:
             return parent::__get($strKey);
             break;
     }
 }
开发者ID:bytehead,项目名称:contao-core,代码行数:24,代码来源:FormTextArea.php

示例6: __get

 /**
  * Return an object property
  *
  * @param string $strKey
  *
  * @return mixed
  */
 public function __get($strKey)
 {
     if (isset($this->arrData[$strKey])) {
         return $this->arrData[$strKey];
     }
     return parent::__get($strKey);
 }
开发者ID:heimrichhannot,项目名称:contao-bootstrapper,代码行数:14,代码来源:BootstrapperFormField.php

示例7: __get

 /**
  * Return a parameter
  *
  * @param string $strKey The parameter key
  *
  * @return mixed The parameter value
  */
 public function __get($strKey)
 {
     switch ($strKey) {
         case 'name':
             return $this->strCaptchaKey;
             break;
         case 'question':
             return $this->strQuestion;
             break;
         default:
             return parent::__get($strKey);
             break;
     }
 }
开发者ID:StephenGWills,项目名称:sample-contao-app,代码行数:21,代码来源:FormCaptcha.php

示例8: __get

 public function __get($strKey)
 {
     switch ($strKey) {
         case 'value':
             /**
              * reformat array if we have only one field
              * from array[]['fieldname'] = value
              * to array[] = value
              * so we have the same behavoir like multiple-checkbox fields
              */
             if ($this->flatArray) {
                 $arrNew = array();
                 foreach ($this->varValue as $val) {
                     $arrNew[] = $val[key($this->columnFields)];
                 }
                 return $arrNew;
             } else {
                 return parent::__get($strKey);
             }
             break;
         default:
             return parent::__get($strKey);
             break;
     }
 }
开发者ID:Addictic,项目名称:MultiColumnWizard,代码行数:25,代码来源:MultiColumnWizard.php

示例9: __get

 /**
  * Return a parameter
  *
  * @return string $strKey
  */
 public function __get($strKey)
 {
     switch ($strKey) {
         case 'currentRecord':
             return \Input::get('id');
         case 'params':
             return $GLOBALS['TL_DCA'][$this->strTable]['fields'][$this->strField]['params'];
         case 'foreignTable':
             return $GLOBALS['TL_DCA'][$this->strTable]['fields'][$this->strField]['foreignTable'];
         case 'foreignField':
             $foreignField = $GLOBALS['TL_DCA'][$this->strTable]['fields'][$this->strField]['foreignField'];
             if (empty($foreignField)) {
                 $foreignField = 'pid';
             }
             return $foreignField;
         case 'foreignTableCallback':
             return $GLOBALS['TL_DCA'][$this->strTable]['fields'][$this->strField]['foreignTableCallback'];
         default:
             return parent::__get($strKey);
     }
 }
开发者ID:terminal42,项目名称:dcawizard,代码行数:26,代码来源:DcaWizard.php

示例10: __get

 /**
  * Return a parameter
  *
  * @param string $strKey The parameter key
  *
  * @return mixed The parameter value
  */
 public function __get($strKey)
 {
     switch ($strKey) {
         case 'value':
             if (is_array($this->varValue)) {
                 return array($this->varValue[0], \Idna::decode($this->varValue[1]));
             } else {
                 return array('', \Idna::decode($this->varValue));
             }
             break;
         case 'type':
             return 'text';
             break;
         default:
             return parent::__get($strKey);
             break;
     }
 }
开发者ID:hh-com,项目名称:contao-mm-frontendInput,代码行数:25,代码来源:FormURLField.php

示例11: __get

 /**
  * Return an object property.
  *
  * Supported keys:
  *
  * * sourceName: the name of the data container for the item elements.
  * * fieldType : the input type. Either "radio" or "checkbox".
  * * titleIcon:  the icon to use in the title section.
  * * mandatory:  the field value must not be empty.
  *
  * @param string $strKey The property name.
  *
  * @return string The property value.
  */
 public function __get($strKey)
 {
     switch ($strKey) {
         case 'sourceName':
             return $this->sourceName;
         case 'fieldType':
             return $this->fieldType;
         case 'titleIcon':
             return $this->titleIcon;
         case 'mandatory':
             return $this->arrConfiguration['mandatory'];
         case 'orderField':
             return $this->orderField;
         default:
     }
     return parent::__get($strKey);
 }
开发者ID:zonky2,项目名称:dc-general,代码行数:31,代码来源:TreePicker.php


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