當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。