当前位置: 首页>>代码示例>>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;未经允许,请勿转载。