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


PHP Field::create方法代码示例

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


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

示例1: store

 /**
  * Store a newly created resource in storage.
  *
  * @return Response
  */
 public function store()
 {
     $input = Input::all();
     $validation = Validator::make($input, Field::$rules);
     if ($validation->passes()) {
         $this->field->create($input);
         return Redirect::route('fields.index');
     }
     return Redirect::route('fields.create')->withInput()->withErrors($validation)->with('message', 'There were validation errors.');
 }
开发者ID:bailey9005,项目名称:Laravel-For-Landing-Pages,代码行数:15,代码来源:FieldsController.php

示例2: run

 public function run()
 {
     DB::table('fields')->delete();
     Field::create(array('id' => 1, 'field' => 'inf', 'level' => 1));
     Field::create(array('id' => 2, 'field' => 'geo', 'level' => 1));
     Field::create(array('id' => 3, 'field' => 'os', 'level' => 1));
     Field::create(array('id' => 4, 'field' => 'inf', 'level' => 2));
     Field::create(array('id' => 5, 'field' => 'geo', 'level' => 2));
     Field::create(array('id' => 6, 'field' => 'os', 'level' => 2));
 }
开发者ID:KaBogdal,项目名称:PracaInzynierska,代码行数:10,代码来源:FieldTableSeeder.php

示例3: __construct

 public function __construct($data, $templateHandler, $optionData)
 {
     $this->configData = $data;
     $this->templateHandler = $templateHandler;
     foreach ($this->configData->fields as $fieldData) {
         $data = null;
         if (array_key_exists($fieldData->name, $optionData)) {
             $data = $optionData[$fieldData->name];
         } else {
             if (property_exists($fieldData, 'default')) {
                 $data = $fieldData->default;
             }
         }
         $this->fields[] = Field::create($fieldData, $this->templateHandler, $data);
     }
 }
开发者ID:dwalkr,项目名称:wp-admin-utility,代码行数:16,代码来源:FieldSection.php

示例4: __construct

 public function __construct($data, $templateHandler)
 {
     $this->configData = $data;
     $this->templateHandler = $templateHandler;
     foreach ($this->configData->fields as $fieldData) {
         if (array_key_exists('post', $_GET)) {
             $post_id = $_GET['post'];
             $data = get_post_meta($post_id, $fieldData->name, true);
         } else {
             $data = false;
         }
         if ($data === false && property_exists($fieldData, 'default')) {
             $data = $fieldData->default;
         }
         $this->fields[] = Field::create($fieldData, $this->templateHandler, $data);
     }
 }
开发者ID:dwalkr,项目名称:wp-admin-utility,代码行数:17,代码来源:MetaBox.php

示例5: foreach

                    $field_id = $column_description['strScreenTitle'];
                }
            }
            $field = Field::create()->find($field_id);
            echo $field['strName'];
            break;
        case 'COL_CIRCULATION_FIELD2':
            echo "<td class=\"table_header\" align=\"left\" nowrap>";
            echo "<a style=\"color: #fff;\">";
            $field_id = 1;
            foreach ($arrCONF_AllCols as $column_description) {
                if ($column_description['strTitle'] == 'COL_CIRCULATION_FIELD2') {
                    $field_id = $column_description['strScreenTitle'];
                }
            }
            $field = Field::create()->find($field_id);
            echo $field['strName'];
            break;
    }
    echo '</a></td>';
}
if ($archivemode != 1) {
    ?>
        	<td class="table_header">
        		<?php 
    echo $CIRCULATION_VIEW_PROCESS;
    ?>
        	</td>
        	<?php 
}
?>
开发者ID:honglei619,项目名称:cuteflow_v2,代码行数:31,代码来源:showcirculation_sorted.php


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