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


PHP theme::element方法代码示例

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


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

示例1: open_form

 public static function open_form($attr = [])
 {
     $defaults['action'] = '/capture-handler';
     $defaults['method'] = 'post';
     $defaults['accept-charset'] = 'UTF-8';
     $defaults['enctype'] = 'application/x-www-form-urlencoded';
     $defaults['autocomplete'] = 'off';
     $defaults['novalidate'] = '';
     $defaults['data-parsley-validate'] = '';
     $defaults['class'] .= trim('js-parsley ' . $attr['class']);
     $defaults['success'] = '/' . ci()->uri->uri_string();
     $defaults['fail'] = '/' . ci()->uri->uri_string();
     $defaults['name'] = 'None Set';
     $attr = array_diff_key($defaults, $attr) + array_intersect_key($attr, $defaults);
     $name = $attr['name'];
     $success = $attr['success'];
     $fail = $attr['fail'];
     $honey_pot = 'team_name';
     unset($attr['name']);
     unset($attr['success']);
     unset($attr['fail']);
     $html = theme::element('form', $attr);
     $html .= '<input type="hidden" name="_form_name" value="' . theme::hash($name) . '">';
     $html .= '<input type="hidden" name="_success_goto" value="' . theme::hash($success) . '">';
     $html .= '<input type="hidden" name="_fail_goto" value="' . theme::hash($fail) . '">';
     $html .= '<div class="capture_field"><input name="' . $honey_pot . '" value=""></div>';
     return $html;
 }
开发者ID:ProjectOrangeBox,项目名称:capture,代码行数:28,代码来源:O_capture.php

示例2: dropdown

 public static function dropdown($name, $value, $extra = [])
 {
     $defaults = ['name' => $name, 'style' => '', 'id' => $name, 'class' => ''];
     $list = array_merge($defaults, $extra);
     $list['class'] .= ' select3';
     $empty = $extra['empty'];
     unset($extra['empty']);
     $fa = self::awesomeness();
     $fa = array_combine($fa, $fa);
     echo theme::element('select', $list);
     if ($empty) {
         echo '<option value="" selected>&nbsp;</option>';
     }
     foreach ($fa as $fa) {
         $selected = $value == $fa && $empty == FALSE ? ' selected' : '';
         echo '<option ' . $selected . ' value="' . $fa . '" data-icon="fa fa-' . $fa . '">' . ucwords(str_replace(['fa-', '-o'], '', $fa)) . '</option>';
     }
     echo '</select>';
 }
开发者ID:ProjectOrangeBox,项目名称:plugin-fontawesome,代码行数:19,代码来源:Plugin_fontawesome.php

示例3: uniqid

<?php

$index = 'id' . uniqid();
theme::element('div', ['id' => $index, 'class' => 'magic-row']);
theme::element('div', ['style' => 'width:95%', 'class' => 'portal-cell']);
theme::hidden('t_orange_c[' . $index . '][id]', $record->id);
theme::hidden('t_orange_c[' . $index . '][parent_id]', $record->parent_id);
theme::start_form_section('Name');
theme::text('t_orange_c[' . $index . '][name]', $record->name);
theme::end_form_section();
theme::start_form_section('Age', 2);
theme::text('t_orange_c[' . $index . '][age]', $record->age);
theme::end_form_section();
theme::element('/div');
theme::element('div', ['style' => 'width:5%', 'class' => 'portal-cell portal-cell-action']);
//theme::table_action('edit',$this->controller_path.'/xedit/'.$record->id,['class'=>'js-o_dialog','data'=>['redirect'=>'true','heading'=>'Leave this record?','text'=>'If you edit this record you will leave the current record.']]);
o_dialog::confirm_a_delete($this->controller_path . '/delete_child/' . $parent_id . '/' . $record->id, ['div' => $index]);
theme::element('/div');
theme::element('/div');
开发者ID:ProjectOrangeBox,项目名称:orange-juicer,代码行数:19,代码来源:new_child.php


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