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


PHP Department::options方法代码示例

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


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

示例1: fields

 public static function fields()
 {
     return ['add' => ['bid' => ['label' => '所属门店', 'type' => 'select', 'inputOptions' => ['class' => 'col-lg-3'], 'options' => Branch::options(), 'default' => 0, 'validator' => ['required' => true]], 'did' => ['label' => '部门名称', 'type' => 'select', 'inputOptions' => ['class' => 'col-lg-3'], 'options' => Department::options(), 'default' => 0, 'validator' => ['required' => true]], 'name' => ['label' => '角色名称', 'type' => 'text', 'inputOptions' => ['class' => 'col-lg-3'], 'validator' => ['required' => true, 'minlength' => 2, 'maxlength' => 10], 'remark' => '名称在2-10个字符之间']], 'edit' => ['rid' => ['type' => 'hidden'], 'bid' => ['label' => '所属门店', 'type' => 'select', 'inputOptions' => ['class' => 'col-lg-3'], 'options' => Branch::options(), 'default' => 0, 'validator' => ['required' => true]], 'did' => ['label' => '部门名称', 'type' => 'select', 'inputOptions' => ['class' => 'col-lg-3'], 'options' => Department::options(), 'default' => 0, 'validator' => ['required' => true]], 'name' => ['label' => '角色名称', 'type' => 'text', 'inputOptions' => ['class' => 'col-lg-3'], 'validator' => ['required' => true, 'minlength' => 2, 'maxlength' => 10], 'remark' => '名称在2-10个字符之间']], 'auth' => ['rid' => ['type' => 'hidden'], 'auth' => ['type' => 'checkbox', 'safe' => true]]];
 }
开发者ID:Crocodile26,项目名称:php-1,代码行数:4,代码来源:RoleForm.php

示例2: fields

 public static function fields()
 {
     return ['add' => ['oid' => null, 'bid' => ['label' => '所属分店', 'type' => 'select', 'inputOptions' => [], 'options' => Branch::options(), 'default' => null, 'validator' => ['required' => true]], 'did' => ['label' => '所属部门', 'type' => 'select', 'inputOptions' => ['class' => 'col-lg-3'], 'options' => Department::options(), 'default' => 0, 'validator' => ['required' => true]], 'rid' => ['label' => '角色名称', 'type' => 'select', 'inputOptions' => ['class' => 'col-lg-3'], 'options' => Role::options(), 'default' => 0, 'validator' => ['required' => true]], 'username' => ['label' => '用户名', 'type' => 'text', 'inputOptions' => ['class' => 'col-lg-3'], 'validator' => ['required' => true, 'minlength' => 3, 'maxlength' => 20, 'regex' => '^[\\\\w_]+$', 'remote' => \Func\url('/operator/exist')], 'remark' => '用户名在3-20个字符之间, 字母数字或下划线组成', 'remarkOptions' => ['class' => 'col-lg-4']], 'password' => ['label' => '密码', 'type' => 'password', 'inputOptions' => ['class' => 'col-lg-3'], 'validator' => ['required' => true, 'minlength' => 6, 'maxlength' => 12]], 'repassword' => ['label' => '确认密码', 'type' => 'password', 'inputOptions' => ['class' => 'col-lg-3'], 'validator' => ['required' => true, 'equalTo' => '[name=password]']]], 'edit' => ['oid' => ['type' => 'hidden'], 'username' => ['label' => '用户名', 'type' => 'plain', 'default' => null], 'bid' => ['label' => '所属分店', 'type' => 'select', 'inputOptions' => [], 'options' => Branch::options(), 'default' => null, 'validator' => ['required' => true]], 'did' => ['label' => '所属部门', 'type' => 'select', 'inputOptions' => ['class' => 'col-lg-3'], 'options' => Department::options(), 'default' => 0, 'validator' => ['required' => true]], 'rid' => ['label' => '角色名称', 'type' => 'select', 'inputOptions' => [], 'options' => Role::options(), 'default' => null, 'validator' => ['required' => true]], 'password' => ['label' => '密码', 'type' => 'password', 'inputOptions' => [], 'validator' => ['minlength' => 6, 'maxlength' => 12]], 'repassword' => ['label' => '确认密码', 'type' => 'password', 'inputOptions' => [], 'validator' => ['equalTo' => '[name=password]']]]];
 }
开发者ID:Crocodile26,项目名称:php-1,代码行数:4,代码来源:OperatorForm.php


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