*
* Generated from xml/schema/CRM/Contact/Group.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:d0b8ad59d0e80070e103ca1db922cfd5)
+ * (GenCodeChecksum:80e014865346a828f58a093fcfa515dc)
*/
/**
'bao' => 'CRM_Contact_BAO_Group',
'localizable' => 0,
'serialize' => self::SERIALIZE_COMMA,
+ 'pseudoconstant' => [
+ 'callback' => 'CRM_Core_PseudoConstant::allGroup',
+ ]
],
'children' => [
'name' => 'children',
* array reference of all groups.
*/
public static function allGroup($groupType = NULL, $excludeHidden = TRUE) {
+ if ($groupType === 'validate') {
+ // validate gets passed through from getoptions. Handle in the deprecated
+ // fn rather than change the new pattern.
+ $groupType = NULL;
+ }
$condition = CRM_Contact_BAO_Group::groupTypeCondition($groupType, $excludeHidden);
$groupKey = ($groupType ? $groupType : 'null') . !empty($excludeHidden);
break;
case CRM_Utils_Type::T_TEXT:
- _civicrm_api3_validate_html($params, $fieldName, $fieldInfo);
- break;
-
case CRM_Utils_Type::T_STRING:
_civicrm_api3_validate_string($params, $fieldName, $fieldInfo, $entity);
break;
break;
case CRM_Utils_Type::T_TEXT:
- //blob
- _civicrm_api3_validate_html($params, $fieldName, $fieldInfo);
- break;
-
case CRM_Utils_Type::T_STRING:
_civicrm_api3_validate_string($params, $fieldName, $fieldInfo, $entity);
break;
$params['parents']["(SELECT api_key FROM civicrm_contact where id = 1)"] = "Test";
$this->callAPIFailure('group', 'create', $params);
unset($params['parents']["(SELECT api_key FROM civicrm_contact where id = 1)"]);
- $group2 = $this->callAPISuccess('group', 'create', $params);
- $this->assertEquals(count($group2['values'][$group2['id']]['parents']), 1);
+ $this->callAPIFailure('group', 'create', $params, '\'test Group\' is not a valid option for field parents');
}
/**
<comment>IDs of the parent(s)</comment>
<add>2.1</add>
<serialize>COMMA</serialize>
+ <pseudoconstant>
+ <callback>CRM_Core_PseudoConstant::group</callback>
+ </pseudoconstant>
</field>
<field>
<name>children</name>