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


PHP form::__construct方法代码示例

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


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

示例1: array

 function __construct()
 {
     parent::__construct();
     $this->form_list = array("todouhuken" => array(1 => "北海道", 2 => "青森県", 3 => "岩手県", 4 => "宮城県", 5 => "秋田県", 6 => "山形県", 7 => "福島県", 8 => "茨城県", 9 => "栃木県", 10 => "群馬県", 11 => "埼玉県", 12 => "千葉県", 13 => "東京都", 14 => "神奈川県", 15 => "新潟県", 16 => "富山県", 17 => "石川県", 18 => "福井県", 19 => "山梨県", 20 => "長野県", 21 => "岐阜県", 22 => "静岡県", 23 => "愛知県", 24 => "三重県", 25 => "滋賀県", 26 => "京都府", 27 => "大阪府", 28 => "兵庫県", 29 => "奈良県", 30 => "和歌山県", 31 => "鳥取県", 32 => "島根県", 33 => "岡山県", 34 => "広島県", 35 => "山口県", 36 => "徳島県", 37 => "香川県", 38 => "愛媛県", 39 => "高知県", 40 => "福岡県", 41 => "佐賀県", 42 => "長崎県", 43 => "熊本県", 44 => "大分県", 45 => "宮崎県", 46 => "鹿児島県", 47 => "沖縄県"), "seibetsu" => array(1 => "男姓", 2 => "女姓", 3 => "その他"), "birth_year" => array_combine(range(2014, 1900), range(2014, 1900)), "birth_month" => array_combine(range(1, 12), range(1, 12)), "birth_day" => array_combine(range(1, 31), range(1, 31)));
     $this->error = array("email_error" => array(array("message" => "このフィールドは入力必須です。", "method" => "notNull", "field" => "email"), array("message" => "正しく入力してください。", "method" => "isMailAddress", "field" => "email"), array("message" => "すでに登録済みです。", "method" => "isNotMember", "field" => "email")), "password_error" => array(array("message" => "このフィールドは入力必須です。", "method" => "notNull", "field" => "password"), array("message" => "6~16文字で入力してください。", "method" => "lengthBetween", "field" => "password", "arg" => array(6, 16)), array("message" => "英数字で入力してください。", "method" => "isAlphanumeric", "field" => "password"), array("message" => "英語と数字を1文字以上ずつ含めてください。", "method" => "isStrongPass", "field" => "password")), "re_password_error" => array(array("message" => "このフィールドは入力必須です。", "method" => "notNull", "field" => "re_password"), array("message" => "パスワードと一致していません。", "method" => "myEqual", "field" => "re_and_password")), "name_error" => array(array("message" => "このフィールドは入力必須です。", "method" => "notNull", "field" => "sei"), array("message" => "このフィールドは入力必須です。", "method" => "notNull", "field" => "mei"), array("message" => "最大16文字です。", "method" => "lengthBetween", "field" => "sei", "arg" => array(1, 16)), array("message" => "最大16文字です。", "method" => "lengthBetween", "field" => "mei", "arg" => array(1, 16)), array("message" => "使用できない文字が含まれています。", "method" => "isName", "field" => "sei"), array("message" => "使用できない文字が含まれています。", "method" => "isName", "field" => "mei")), "kana_error" => array(array("message" => "このフィールドは入力必須です。", "method" => "notNull", "field" => "sei_kana"), array("message" => "このフィールドは入力必須です。", "method" => "notNull", "field" => "mei_kana"), array("message" => "最大16文字です。", "method" => "lengthBetween", "field" => "sei_kana", "arg" => array(1, 16)), array("message" => "最大16文字です。", "method" => "lengthBetween", "field" => "mei_kana", "arg" => array(1, 16)), array("message" => "ひらがなで入力してください。", "method" => "isKana", "field" => "sei_kana", "arg" => array(true)), array("message" => "ひらがなで入力してください。", "method" => "isKana", "field" => "mei_kana", "arg" => array(true))), "seibetsu_error" => array(array("message" => "このフィールドは入力必須です。", "method" => "notNull", "field" => "seibetsu"), array("message" => "正しく入力してください。", "method" => "inEnum", "field" => "seibetsu", "arg" => array(array_keys($this->form_list["seibetsu"])))), "todouhuken_error" => array(array("message" => "このフィールドは入力必須です。", "method" => "notNull", "field" => "todouhuken"), array("message" => "正しく入力してください。", "method" => "inEnum", "field" => "todouhuken", "arg" => array(array_keys($this->form_list["todouhuken"])))), "birthday_error" => array(array("message" => "このフィールドは入力必須です。", "method" => "notNull", "field" => "birth_year"), array("message" => "正しく入力してください。", "method" => "inEnum", "field" => "birth_year", "arg" => array(array_keys($this->form_list["birth_year"]))), array("message" => "このフィールドは入力必須です。", "method" => "notNull", "field" => "birth_month"), array("message" => "正しく入力してください。", "method" => "inEnum", "field" => "birth_month", "arg" => array(array_keys($this->form_list["birth_month"]))), array("message" => "このフィールドは入力必須です。", "method" => "notNull", "field" => "birth_day"), array("message" => "正しく入力してください。", "method" => "inEnum", "field" => "birth_day", "arg" => array(array_keys($this->form_list["birth_day"]))), array("message" => "日付が正しくありません。", "method" => "myIsDate", "field" => "birth_date")));
     $this->post = array("email", "password", "re_password", "sei", "mei", "sei_kana", "mei_kana", "seibetsu", "todouhuken", "birth_year", "birth_month", "birth_day");
 }
开发者ID:xkeitax48,项目名称:mySamples,代码行数:7,代码来源:formList.php

示例2:

 function __construct($route = "user_exec_create", $attr = [])
 {
     parent::__construct($route, $attr);
     $this->setId("formUser");
     $this->setAppMsg("user");
     $this->setLabelShow("placeholder");
     $this->setRoute("user_exec_create");
     $this->setControl(["User" => ["req" => true, "min" => 3, "max" => 15], "UserPassword" => ["req" => true, "min" => "6"], "UserPassword_confirm" => ["req" => true, "equal" => "UserPassword"], "UserLastname" => ["req" => true], "UserFirstname" => ["req" => true], "UserLang" => ["req" => true], "UserDateBorn" => ["date" => true], "UserTel" => ["tel" => true], "UserMail" => ["req" => true, "mail" => true]]);
     $this->setAttr(["class" => "applive-formUser", "autocomplete" => "off"]);
     $this->setExemple(["UserMail" => "john.doe@yahoo.fr", "UserDateBorn" => ["dd-mm-yyyy", "dd/mm/yyyy"], "UserTel" => ["01 34 56 32 22", "04.54.36.46.97"]]);
     $langList = ["FR" => "FR", "EN" => "EN", "ES" => "ES", "IT" => "IT"];
     $this->step("UserStep");
     $this->add("User", "text", "", "", ["autocomplete" => "off"]);
     $this->add("UserPassword", "password");
     $this->add("UserPassword_confirm", "password");
     $this->step("PersonnalStep");
     $this->add("UserLang", "checkbox", [], $langList);
     $this->add("UserCiv", "radio", "", ["MALE" => $this->msg("app", "male"), "FEMALE" => $this->msg("app", "female")]);
     $this->step("PersonnalStep");
     $this->add("UserLastname");
     $this->add("UserFirstname");
     $this->add("UserDateBorn", "date");
     $this->step("SocialStep");
     $this->add("UserMail", "email");
     $this->add("UserSkype");
     $this->add("UserTel");
     $this->add("UserFacebook");
     $this->add("UserTwitter");
     $this->add("UserPinterest");
     $this->add("submit", "submit", "envoyer", "", ["class" => "bg-2 c-7 no-border"]);
     // $this->validate();
 }
开发者ID:rodbox,项目名称:rodbox3,代码行数:32,代码来源:formUser.php

示例3:

 function __construct($route = "user_exec_set_role", $attr = [])
 {
     parent::__construct($route, $attr);
     $this->setRoute("user_exec_set_role");
     $this->setAppMsg("user");
     $this->setAttr(["class" => "formSetRole"]);
     $this->setControl([]);
     $this->add("id", "hidden");
     $roleList = ["FREE" => "FREE", "USER" => "USER", "EDITOR" => "EDITOR", "GRAPH" => "GRAPH", "ADMIN" => "ADMIN", "MASTER" => "MASTER"];
     $this->add("role", "select", "", $roleList, ["class" => "submitOnChange"]);
 }
开发者ID:rodbox,项目名称:rodbox3,代码行数:11,代码来源:formSetRole.php

示例4:

 function __construct($route = "user_exec_login", $attr = [])
 {
     parent::__construct($route, $attr);
     $this->setId("formLogin");
     $this->setAppMsg("user");
     $this->setRoute("user_exec_login");
     $this->setAttr(["class" => ""]);
     $this->setControl(["User" => ["req" => true], "UserPassword" => ["req" => true]]);
     $this->add("User", "text", "", "", ["autofocus" => true]);
     $this->add("UserPassword", "password");
     $this->add("UserRemember", "checkbox", [], ["remember_me" => $this->msg("user", "UserRememberLabel")], ["class" => "w-100"]);
     $this->add("submit", "submit", "Se connecter", "", ["class" => "bg-8 c-7  w-100 block pad-5 no-border"]);
 }
开发者ID:rodbox,项目名称:rodbox3,代码行数:13,代码来源:formLogin.php

示例5: array

 function __construct($cond = null)
 {
     // liste des champs nécessaires - sauf token non crypté
     //$this->fields = array('nom', 'url', 'email', 'texto');
     $this->fields['nom'] = array('type' => 'text', 'name' => 'nom', 'size' => 18, 'maxlength' => 20, 'value' => '', 'label' => array('txt' => 'Nom : '));
     $this->fields['email'] = array('type' => 'text', 'name' => 'email', 'size' => 22, 'maxlength' => 40, 'value' => '', 'label' => array('txt' => 'Email : '));
     $this->fields['url'] = array('type' => 'text', 'name' => 'url', 'size' => 25, 'maxlength' => 50, 'value' => 'http://', 'label' => array('txt' => 'URL : '));
     $this->fields['texto'] = array('type' => 'textarea', 'name' => 'texto', 'cols' => 60, 'rows' => 4, 'wrap' => 'virtual', 'value' => '');
     $this->fields['submit'] = array('type' => 'submit', 'name' => 'Submit', 'value' => 'Envoyer', 'label' => array('txt' => 'Nom et message obligatoires.'));
     $this->fields['question'] = array('type' => 'text', 'size' => 2, 'name' => 'question');
     $this->fields['answer'] = array('type' => 'hidden', 'name' => 'answer');
     parent::__construct($cond);
 }
开发者ID:dekka75,项目名称:jenkins,代码行数:13,代码来源:comment.class.php

示例6: __construct

 public function __construct()
 {
     $this->glider = new glider();
     parent::__construct($this->glider->get_fields());
     $this->get_field_from_name('gid')->set_attr('hidden', true)->set_attr('required', false);
     $this->get_field_from_name('name')->set_attr('label', 'Name');
     $this->get_field_from_name('mid')->set_attr('label', 'Manufacturer')->set_attr('options', ['order' => 'title ASC']);
     $this->get_field_from_name('class')->set_attr('label', 'Class')->set_attr('options', [1 => 1, 5 => 5]);
     $this->get_field_from_name('kingpost')->set_attr('label', 'Has kingpost?');
     $this->get_field_from_name('single_surface')->set_attr('label', 'Is single surface?');
     $this->id = 'new_glider_form';
     $this->h2 = 'Add a new glider';
     $this->attributes['class'][] = 'form-compact';
     $this->wrapper_class[] = 'callout';
     $this->wrapper_class[] = 'callout-primary';
 }
开发者ID:robchett,项目名称:uknxcl,代码行数:16,代码来源:add_glider_form.php

示例7: __construct

 public function __construct()
 {
     $this->pilot = new pilot();
     parent::__construct($this->pilot->get_fields());
     $this->get_field_from_name('pid')->set_attr('hidden', true)->set_attr('required', false);
     $this->get_field_from_name('name')->set_attr('label', 'Name')->set_attr('required', true);
     $this->get_field_from_name('bhpa_no')->set_attr('label', 'BHPA Number')->set_attr('required', true);
     $this->get_field_from_name('email')->set_attr('label', 'Email');
     $this->get_field_from_name('gender')->set_attr('label', 'Gender')->set_attr('options', ['M' => 'Male', 'F' => 'Female']);
     $this->get_field_from_name('rating')->set_attr('label', 'Rating')->set_attr('options', [1 => 'Club', 2 => 'Advanced']);
     $this->id = 'new_pilot_form';
     $this->h2 = 'Create a new pilot';
     $this->attributes['class'][] = 'form-compact';
     $this->wrapper_class[] = 'callout';
     $this->wrapper_class[] = 'callout-primary';
 }
开发者ID:robchett,项目名称:uknxcl,代码行数:16,代码来源:add_pilot_form.php

示例8:

 function __construct($route = "app_exec_event_upd", $attr = [])
 {
     parent::__construct($route, $attr);
     $this->setId("event");
     // id du formulaire
     $this->setRoute("app_exec_event_upd");
     // route du formulaire
     $this->setAppMsg("app");
     // source des messages
     $this->setLabelShow(true);
     // label true false ou placeholder
     $this->setAttr(["class" => "appliveform"]);
     // /* CONTROL LIST */
     // $this->setControl([
     // 	"ITEM_NAME" => [
     // 		"req"=>true,
     // 		"min"=>3,
     // 		"max"=>15,
     // 		"equal" => "UserPassword",
     // 		"date"=>true,
     // 		"tel"=>true
     // 	]
     // ]);
     // $this->setExemple([
     // 	"ITEM_NAME" => "EXEMPLE_1",
     // 	"ITEM_NAME2" => [
     // 		"EXEMPLE_1",
     // 		"EXEMPLE_2"
     // 	]
     // ]);
     // $listValue = [
     // 	"VALUE1"=>$this->msg("MSG_APP","MSG_ID"),
     // 	"VALUE2"=>$this->msg("MSG_APP","MSG_ID")
     // ];
     // Step
     $this->step("step1");
     $this->add("title", "text");
     $this->add("description", "textarea");
     $this->add("start", "date");
     $this->add("startTime", "time");
     $this->add("end", "date");
     $this->add("endTime", "time");
     $this->add("type", "select", "", ["", "perso" => "perso", "project" => "project"]);
     $this->add("submitEvent", "submit", "Enregistrer", "", ["class" => "bg-2 c-7 no-border w-100 pad-5"]);
 }
开发者ID:rodbox,项目名称:rodbox3,代码行数:45,代码来源:formEvent.php

示例9:

 function __construct($route = "snippet_exec_save", $attr = [])
 {
     parent::__construct($route, $attr);
     $this->setId("snippet-editor");
     $this->setRoute("snippet_exec_save");
     $this->setLabelShow(true);
     // $this->setAppMsg("snippet");
     // $this->setAppMsg("snippet");
     $this->setControl(["snippetName" => ["req" => true], "trigger" => ["req" => true], "content" => ["req" => true]]);
     $this->setAttr(["class" => ""]);
     $this->add("snippetName", "", "", "", ["id" => "", "class" => "form-control", "placeholder" => "SnippetName", "autocomplete" => "off"]);
     $this->add("trigger", "", "", "", ["id" => "", "class" => "form-control", "placeholder" => "trigger", "autocomplete" => "off", "data-" => ""]);
     $this->add("myTextarea", "textarea", "", "", ["id" => "myTextarea", "class" => "form-control border-preview caretposition", "data-follower" => "#sub"]);
     $this->add("desc", "", "", "", ["class" => "form-control", "placeholder" => "Description"]);
     $this->add("type", "select", "", ["" => "all", "source.php" => "php", "source.html" => "html", "source.js" => "javascript", "source.css" => "css", "source.md" => "md", "source.twig" => "twig"], ["class" => "form-control selectpicker"]);
     $this->add("category", "select", "", $this->model("snippet", "cat-list"), ["id" => "category", "class" => "form-control selectpicker"]);
     $this->add("submit", "submit", "envoyer", "", ["class" => "block btn btn-xl w-100 bg-1"]);
 }
开发者ID:rodbox,项目名称:rodbox3,代码行数:18,代码来源:formSnippet.php

示例10:

 function __construct($route = "user_exec_create", $attr = [])
 {
     parent::__construct($route, $attr);
     $this->setId("FORM_ID");
     // id du formulaire
     $this->setRoute("FORM_ROUTE");
     // route du formulaire
     $this->setAppMsg("FORM_APP_MSG");
     // source des messages
     $this->setLabelShow("TRUE_FALSE_PLACEHOLDER");
     // label true false ou placeholder
     $this->setAttr(["class" => "FORM_CLASS", "FORM_ATTR" => "FORM_ATTR_VALUE"]);
     /* CONTROL LIST */
     $this->setControl(["ITEM_NAME" => ["req" => true, "min" => 3, "max" => 15, "equal" => "UserPassword", "date" => true, "tel" => true]]);
     $this->setExemple(["ITEM_NAME" => "EXEMPLE_1", "ITEM_NAME2" => ["EXEMPLE_1", "EXEMPLE_2"]]);
     $listValue = ["VALUE1" => $this->msg("MSG_APP", "MSG_ID"), "VALUE2" => $this->msg("MSG_APP", "MSG_ID")];
     // Step
     $this->step("step1");
     $this->add("ITEM_NAME", "ITEM_TYPE", "VALUE", "OPTION", "ATTR");
 }
开发者ID:rodbox,项目名称:rodbox3,代码行数:20,代码来源:form.php

示例11: FieldSet

 /**
  * Standard form
  *
  */
 function __construct($controller, $name, Member $member, Group $group)
 {
     $this->group = $group;
     $this->member = $member;
     $fields = new FieldSet();
     $actions = new FieldSet();
     $requiredFields = null;
     if ($this->group) {
         $fieldsArray = $this->group->CorporateAddressFieldsArray();
         $fields->push(new TextField("Title", _t("EcommerceCorporateAccount.NAME", "Name")));
         foreach ($fieldsArray as $newField) {
             $fields->push($newField);
         }
         $requiredFields = new CorporateAccountOrganisationForm_Validator();
         $actions->push(new FormAction('updatedetails', _t('EcommerceCorporateAccount.UPDATEDETAILS', 'Update Details')));
     } elseif ($this->member) {
         $fields->push(new LiteralField('MemberNotApprovedYest', '<p>' . _t('EcommerceCorporateAccount.NOTAPPROVEDYE', 'Your account has not been approved yet.') . '</p>'));
         $actions->push(new FormAction('requestapproval', _t('EcommerceCorporateAccount.REQUESTAPPROVAL', 'Request Approval')));
     }
     //construct the form...
     parent::__construct($controller, $name, $fields, $actions, $requiredFields);
     if ($this->group) {
         $this->loadDataFrom($this->group);
     }
     //extensions need to be set after __construct
     if ($this->extend('updateFields', $fields) !== null) {
         $this->setFields($fields);
     }
     if ($this->extend('updateActions', $actions) !== null) {
         $this->setActions($actions);
     }
     if ($this->extend('updateValidator', $requiredFields) !== null) {
         $this->setValidator($requiredFields);
     }
     $this->extend('updateCorporateAccountOrganisationForm', $this);
 }
开发者ID:helpfulrobot,项目名称:sunnysideup-ecommerce-corporate-account,代码行数:40,代码来源:CorporateAccountOrganisationForm.php

示例12:

 function __construct($route = "CV_exec_save", $attr = [])
 {
     parent::__construct($route, $attr);
     $this->add("CV");
 }
开发者ID:rodbox,项目名称:rodbox3,代码行数:5,代码来源:formCV.php

示例13: __construct

 /**
  * Construct
  *
  * @param \phpbb\auth\auth $auth
  * @param \phpbb\config\config $config
  * @param \phpbb\config\db_text $config_text
  * @param \phpbb\db\driver\driver_interface $db
  * @param \phpbb\user $user
  * @param string $phpbb_root_path
  * @param string $phpEx
  */
 public function __construct(\phpbb\auth\auth $auth, \phpbb\config\config $config, \phpbb\config\db_text $config_text, \phpbb\db\driver\driver_interface $db, \phpbb\user $user, $phpbb_root_path, $phpEx)
 {
     parent::__construct($auth, $config, $db, $user, $phpbb_root_path, $phpEx);
     $this->config_text = $config_text;
 }
开发者ID:Tarendai,项目名称:spring-website,代码行数:16,代码来源:admin_form.php

示例14:

 function __construct($id, $action, $method = "post")
 {
     parent::__construct($id, $action, $method);
     $this->req(["required input elem name"]);
     $this->add("photos");
 }
开发者ID:rodbox,项目名称:rodbox3,代码行数:6,代码来源:formPhotos.php

示例15:

 function __construct(DOMElement $e)
 {
     parent::__construct($e);
 }
开发者ID:PapaKot,项目名称:Horowitz,代码行数:4,代码来源:formGallery.php


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