private static $cache;
/**
+ * DEPRECATED. Please use the buildOptions() method in the appropriate BAO object.
+ *
* activity type
* @var array
* @static
private static $countryIsoCode;
/**
+ * DEPRECATED. Please use the buildOptions() method in the appropriate BAO object.
+ *
* group
* @var array
* @static
private static $worldRegions;
/**
+ * DEPRECATED. Please use the buildOptions() method in the appropriate BAO object.
+ *
* activity status
* @var array
* @static
}
/**
+ * DEPRECATED. Please use the buildOptions() method in the appropriate BAO object.
+ *
* Get all groups from database
*
* The static array group is returned, and if it's
}
/**
+ * DEPRECATED. Please use the buildOptions() method in the appropriate BAO object.
+ *
* Get all Activity Statuses.
*
* The static array activityStatus is returned
*/
function testOptionValues() {
+ // Create a custom field group for testing.
$custom_group_name = md5(microtime());
$api_params = array(
'version' => 3,
);
$result = civicrm_api('customGroup', 'create', $api_params);
+ // Create a Group for testing.
+ $group_name = md5(microtime());
+ $api_params = array(
+ 'version' => 3,
+ 'title' => $group_name,
+ 'is_active' => TRUE,
+ );
+ $result = civicrm_api('group', 'create', $api_params);
+
/**
* daoName/field combinations to test
* Format: array[DAO Name] = $properties, where properties is an array whose
* - max: integer (default = 10) maximum number of option values expected.
*/
$fields = array(
+ 'CRM_Contact_DAO_GroupContact' => array(
+ array(
+ 'fieldName' => 'group_id',
+ 'sample' => $group_name,
+ ),
+ ),
+ 'CRM_Contact_DAO_GroupContactCache' => array(
+ array(
+ 'fieldName' => 'group_id',
+ 'sample' => $group_name,
+ ),
+ ),
+ 'CRM_Contact_DAO_GroupOrganization' => array(
+ array(
+ 'fieldName' => 'group_id',
+ 'sample' => $group_name,
+ ),
+ ),
+ 'CRM_Contact_DAO_SubscriptionHistory' => array(
+ array(
+ 'fieldName' => 'group_id',
+ 'sample' => $group_name,
+ ),
+ ),
+ 'CRM_Core_DAO_ActionSchedule' => array(
+ array(
+ 'fieldName' => 'group_id',
+ 'sample' => $group_name,
+ ),
+ ),
+ 'CRM_Mailing_Event_DAO_Subscribe' => array(
+ array(
+ 'fieldName' => 'group_id',
+ 'sample' => $group_name,
+ ),
+ ),
'CRM_Activity_DAO_Activity' => array(
array(
'fieldName' => 'activity_type_id',
<required>true</required>
<comment>FK to civicrm group.</comment>
<add>2.0</add>
+ <pseudoconstant>
+ <table>civicrm_group</table>
+ <keyColumn>id</keyColumn>
+ <labelColumn>title</labelColumn>
+ </pseudoconstant>
</field>
<foreignKey>
<name>group_id</name>
<required>true</required>
<comment>FK to admin civicrm group.</comment>
<add>2.0</add>
+ <pseudoconstant>
+ <table>civicrm_group</table>
+ <keyColumn>id</keyColumn>
+ <labelColumn>title</labelColumn>
+ </pseudoconstant>
</field>
<foreignKey>
<name>admin_group_id</name>
<add>2.0</add>
</index>
<field>
- <name>group_id</name>
- <type>int unsigned</type>
- <required>true</required>
- <comment>FK to civicrm group.</comment>
- <add>2.0</add>
+ <name>group_id</name>
+ <type>int unsigned</type>
+ <required>true</required>
+ <comment>FK to civicrm group.</comment>
+ <add>2.0</add>
+ <pseudoconstant>
+ <table>civicrm_group</table>
+ <keyColumn>id</keyColumn>
+ <labelColumn>title</labelColumn>
+ </pseudoconstant>
</field>
<foreignKey>
<name>group_id</name>
<autoincrement>true</autoincrement>
</primaryKey>
<field>
- <name>group_id</name>
- <type>int unsigned</type>
- <title>Group ID</title>
- <required>true</required>
- <comment>FK to civicrm_group</comment>
- <add>1.1</add>
+ <name>group_id</name>
+ <type>int unsigned</type>
+ <title>Group ID</title>
+ <required>true</required>
+ <comment>FK to civicrm_group</comment>
+ <add>1.1</add>
+ <pseudoconstant>
+ <table>civicrm_group</table>
+ <keyColumn>id</keyColumn>
+ <labelColumn>title</labelColumn>
+ </pseudoconstant>
</field>
<foreignKey>
<name>group_id</name>
<autoincrement>true</autoincrement>
</primaryKey>
<field>
- <name>group_id</name>
- <type>int unsigned</type>
- <required>true</required>
- <comment>FK to civicrm_group</comment>
- <add>2.1</add>
+ <name>group_id</name>
+ <type>int unsigned</type>
+ <required>true</required>
+ <comment>FK to civicrm_group</comment>
+ <add>2.1</add>
+ <pseudoconstant>
+ <table>civicrm_group</table>
+ <keyColumn>id</keyColumn>
+ <labelColumn>title</labelColumn>
+ </pseudoconstant>
</field>
<foreignKey>
<name>group_id</name>
<required>true</required>
<comment>ID of the group</comment>
<add>2.0</add>
+ <pseudoconstant>
+ <table>civicrm_group</table>
+ <keyColumn>id</keyColumn>
+ <labelColumn>title</labelColumn>
+ </pseudoconstant>
</field>
<foreignKey>
<name>group_id</name>
<onDelete>CASCADE</onDelete>
</foreignKey>
<field>
- <name>group_id</name>
- <type>int unsigned</type>
- <comment>Group Id</comment>
- <add>1.1</add>
+ <name>group_id</name>
+ <type>int unsigned</type>
+ <comment>Group Id</comment>
+ <add>1.1</add>
+ <pseudoconstant>
+ <table>civicrm_group</table>
+ <keyColumn>id</keyColumn>
+ <labelColumn>title</labelColumn>
+ </pseudoconstant>
</field>
<foreignKey>
<name>group_id</name>
<onDelete>SET NULL</onDelete>
</foreignKey>
<field>
- <name>group_id</name>
- <type>int unsigned</type>
- <comment>FK to Group</comment>
- <add>3.4</add>
- </field>
+ <name>group_id</name>
+ <type>int unsigned</type>
+ <comment>FK to Group</comment>
+ <pseudoconstant>
+ <table>civicrm_group</table>
+ <keyColumn>id</keyColumn>
+ <labelColumn>title</labelColumn>
+ </pseudoconstant>
+ <add>3.4</add>
+ </field>
<foreignKey>
<name>group_id</name>
<table>civicrm_group</table>
<autoincrement>true</autoincrement>
</primaryKey>
<field>
- <name>group_id</name>
- <type>int unsigned</type>
- <required>true</required>
- <comment>FK to Group</comment>
+ <name>group_id</name>
+ <type>int unsigned</type>
+ <required>true</required>
+ <comment>FK to Group</comment>
+ <pseudoconstant>
+ <table>civicrm_group</table>
+ <keyColumn>id</keyColumn>
+ <labelColumn>title</labelColumn>
+ </pseudoconstant>
</field>
<foreignKey>
<name>group_id</name>