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


PHP RulesChecker::existsIn方法代码示例

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


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

示例1: buildRules

 /**
  * Returns a rules checker object that will be used for validating
  * application integrity.
  *
  * @param \Cake\ORM\RulesChecker $rules The rules object to be modified.
  * @return \Cake\ORM\RulesChecker
  */
 public function buildRules(RulesChecker $rules)
 {
     $rules->add($rules->existsIn(['student_id'], 'Students'));
     $rules->add($rules->existsIn(['study_group_id'], 'StudyGroups'));
     $rules->add($rules->existsIn(['level_id'], 'Levels'));
     return $rules;
 }
开发者ID:arichtman,项目名称:Student-Reporting,代码行数:14,代码来源:EnrolmentsTable.php

示例2: buildRules

 /**
  * Returns a rules checker object that will be used for validating
  * application integrity.
  *
  * @param \Cake\ORM\RulesChecker $rules The rules object to be modified.
  * @return \Cake\ORM\RulesChecker
  */
 public function buildRules(RulesChecker $rules)
 {
     $rules->add($rules->isUnique(['email']));
     $rules->add($rules->existsIn(['user_id'], 'Users'));
     $rules->add($rules->existsIn(['country_id'], 'Countries'));
     return $rules;
 }
开发者ID:remidiniz,项目名称:cakephp-authclient,代码行数:14,代码来源:ContactsTable.php

示例3: buildRules

 /**
  * Returns a rules checker object that will be used for validating
  * application integrity.
  *
  * @param \Cake\ORM\RulesChecker $rules The rules object to be modified.
  * @return \Cake\ORM\RulesChecker
  */
 public function buildRules(RulesChecker $rules)
 {
     $rules->add($rules->existsIn(['group_id'], 'Groups'));
     $rules->add($rules->existsIn(['user_id'], 'Users'));
     $rules->add($rules->isUnique(['group_id', 'user_id']), ['errorField' => 'User', 'message' => 'User is already part of the group!!']);
     return $rules;
 }
开发者ID:Nandox7,项目名称:StudentCentral,代码行数:14,代码来源:GroupUsersTable.php

示例4: buildRules

 /**
  * Returns a rules checker object that will be used for validating
  * application integrity.
  *
  * @param \Cake\ORM\RulesChecker $rules The rules object to be modified.
  * @return \Cake\ORM\RulesChecker
  */
 public function buildRules(RulesChecker $rules)
 {
     $rules->add($rules->existsIn(['student_id'], 'Students'));
     $rules->add($rules->existsIn(['test_id'], 'Tests'));
     $rules->add($rules->isUnique(['student_id', 'test_id'], 'Cet étudiant a déja participé à cet examen'));
     return $rules;
 }
开发者ID:AFPA-Dijon,项目名称:afpa,代码行数:14,代码来源:StudentsTestsTable.php

示例5: buildRules

 public function buildRules(RulesChecker $rules)
 {
     $rules->add($rules->isUnique(['email']));
     $rules->add($rules->existsIn(['user_id'], 'Users'));
     $rules->add($rules->existsIn(['client_info_id'], 'ClientInfos'));
     return $rules;
 }
开发者ID:julkar9,项目名称:ntrack,代码行数:7,代码来源:ClientContactsTable.php


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