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


PHP field::setGeneralData方法代码示例

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


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

示例1: render

 public function render()
 {
     $output = '';
     if (!empty($this->field)) {
         $data = array();
         $data += parent::setGeneralData();
         if (isset($this->field['type']['maxlength']) && $this->field['type']['maxlength']) {
             $data['maxlength'] = $this->field['type']['maxlength'];
         } else {
             $data['maxlength'] = 32;
         }
         if ($this->field['code'] == 'captcha') {
             $setting = oc::registry()->config->get('quick_order_pro_setting');
             $data['maxlength'] = $setting['captcha_count_items'];
             $data['text_captcha_reload'] = oc::registry()->load->language->get('text_captcha_reload');
         }
         $data['mask'] = $data['placeholder'] = '';
         if (!empty($this->field['type']['use_mask']) && $this->field['type']['use_mask'] && !empty($this->field['type']['mask'])) {
             $data['mask'] = $this->field['type']['mask'];
             oc::registry()->document->addScript('catalog/view/javascript/quick_order_pro/jquery.maskedinput.min.js');
         }
         if (!empty($this->field['type']['placeholder'])) {
             $data['placeholder'] = $this->field['type']['placeholder'];
         }
         $output = $this->renderField($data);
     }
     return $output;
 }
开发者ID:SwayWebStudio,项目名称:night.com,代码行数:28,代码来源:class.field.text.php

示例2: render

 public function render()
 {
     $output = '';
     if (!empty($this->field)) {
         $data = array();
         $data += parent::setGeneralData();
         $data['text_select'] = oc::registry()->load->language->get('text_select');
         $data['multiple'] = $this->field['type']['multiple'];
         if ($data['multiple']) {
             $data['class'] .= ($data['class'] ? ' ' : '') . 'multiple';
         }
         $data['selected'] = array();
         if ($data['value']) {
             if (is_array($data['value'])) {
                 $data['selected'] = $data['value'];
             } else {
                 $data['selected'][] = $data['value'];
             }
         } elseif (!empty($this->field['type']['selected'])) {
             $data['selected'][] = $this->field['type']['selected'];
         }
         if (!empty($this->field['type']['option']) && $this->field['type']['option']) {
             $data['option'] = $this->field['type']['option'];
         } else {
             return $output;
         }
         $output = $this->renderField($data);
     }
     return $output;
 }
开发者ID:SwayWebStudio,项目名称:night.com,代码行数:30,代码来源:class.field.select.php

示例3: render

 public function render()
 {
     $output = '';
     if (!empty($this->field)) {
         $data = parent::setGeneralData();
         $data['maxlength'] = 128;
         $output = $this->renderField($data);
     }
     return $output;
 }
开发者ID:SwayWebStudio,项目名称:night.com,代码行数:10,代码来源:class.field.password.php

示例4: render

 public function render()
 {
     $output = '';
     if (!empty($this->field)) {
         $data = array();
         $data += parent::setGeneralData();
         if (isset($this->field['type']['rows']) && (int) $this->field['type']['rows']) {
             $data['rows'] = (int) $this->field['type']['rows'];
         } else {
             $data['rows'] = 2;
         }
         $data['placeholder'] = $this->field['type']['placeholder'];
         $output = $this->renderField($data);
     }
     return $output;
 }
开发者ID:SwayWebStudio,项目名称:night.com,代码行数:16,代码来源:class.field.textarea.php

示例5: render

 public function render()
 {
     $output = '';
     if (!empty($this->field)) {
         $data = array();
         $data += parent::setGeneralData();
         $data['checked'] = array();
         if ($this->isPOST()) {
             if ($data['value']) {
                 $data['checked'] = $data['value'];
             }
         } elseif (!empty($this->field['type']['checked'])) {
             $data['checked'] = $this->field['type']['checked'];
         }
         if (!empty($this->field['type']['option']) && $this->field['type']['option']) {
             $data['option'] = $this->field['type']['option'];
         } else {
             return $output;
         }
         $output = $this->renderField($data);
     }
     return $output;
 }
开发者ID:SwayWebStudio,项目名称:night.com,代码行数:23,代码来源:class.field.checkbox.php


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