當前位置: 首頁>>代碼示例>>PHP>>正文


PHP RequiredFields::__construct方法代碼示例

本文整理匯總了PHP中RequiredFields::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP RequiredFields::__construct方法的具體用法?PHP RequiredFields::__construct怎麽用?PHP RequiredFields::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在RequiredFields的用法示例。


在下文中一共展示了RequiredFields::__construct方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 /**
  * @param MemberProfileField[] $fields
  * @param Member $member
  */
 public function __construct($fields, $member = null)
 {
     parent::__construct();
     $this->fields = $fields;
     $this->member = $member;
     foreach ($this->fields as $field) {
         if ($field->Required) {
             $this->addRequiredField($field->MemberField);
         }
         if ($field->Unique) {
             $this->unique[] = $field->MemberField;
         }
     }
     if ($member && $member->ID && $member->Password) {
         $this->removeRequiredField('Password');
     }
 }
開發者ID:newsplash,項目名稱:silverstripe-memberprofiles,代碼行數:21,代碼來源:MemberProfileValidator.php

示例2: __construct

 /**
  * Constructor
  */
 public function __construct()
 {
     $required = func_get_args();
     if (isset($required[0]) && is_array($required[0])) {
         $required = $required[0];
     }
     $required = array_merge($required, $this->customRequired);
     parent::__construct($required);
 }
開發者ID:nicmart,項目名稱:comperio-site,代碼行數:12,代碼來源:Member.php

示例3: __construct

 /**
  * Pass required and unique fields as arrays.
  * 
  * Example:
  * new RequiredUniqueFields(
  *  $required = array(
  *      "FirstName",
  *      "Surname",
  *      "Email"
  *  ), $unique = array(
  *      "Email" => _t('Member.EMAILEXISTS', 'Member.EMAILEXISTS')
  *  ), $objectClass = 'Member'
  * )
  * 
  * @param array $required
  * @param array $unique
  * @param string $objectClass
  */
 public function __construct($required = array(), $unique = array(), $objectClass = null)
 {
     $this->unique = $unique;
     $this->objectClass = $objectClass;
     parent::__construct($required);
 }
開發者ID:EduardMa,項目名稱:silverstripe-bootstrap_extra_fields,代碼行數:24,代碼來源:RequiredUniqueFields.php

示例4:

 function __construct($array)
 {
     parent::__construct($array);
 }
開發者ID:helpfulrobot,項目名稱:sunnysideup-ecommerce-software,代碼行數:4,代碼來源:ModuleProductEmail.php

示例5: __construct

 /**
  * Constructor
  */
 public function __construct()
 {
     $required = func_get_args();
     if (isset($required[0]) && is_array($required[0])) {
         $required = $required[0];
     }
     $required = array_merge($required, $this->customRequired);
     // check for config API values and merge them in
     $config = $this->config()->customRequired;
     if (is_array($config)) {
         $required = array_merge($required, $config);
     }
     parent::__construct(array_unique($required));
 }
開發者ID:aaronleslie,項目名稱:aaronunix,代碼行數:17,代碼來源:Member.php

示例6: __construct

 public function __construct(CheckoutComponentConfig $config)
 {
     $this->config = $config;
     parent::__construct($this->config->getRequiredFields());
 }
開發者ID:burnbright,項目名稱:silverstripe-shop,代碼行數:5,代碼來源:CheckoutComponentValidator.php

示例7:

 function __construct($currentID, $array)
 {
     $this->currentID = $currentID;
     parent::__construct($array);
 }
開發者ID:helpfulrobot,項目名稱:sunnysideup-ecommerce-software,代碼行數:5,代碼來源:AddingModuleProduct.php


注:本文中的RequiredFields::__construct方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。