}
}
+ /**
+ * Whitelist of possible values for the entity_table field
+ * @return array
+ */
+ public static function entityTables() {
+ $tables = array(
+ 'civicrm_relationship',
+ 'civicrm_contact',
+ 'civicrm_participant',
+ 'civicrm_contribution',
+ );
+ // Identical keys & values
+ return array_combine($tables, $tables);
+ }
+
}
return array($first, $second, $firstActive, $secondActive);
}
+ /**
+ * Whitelist of possible values for the entity_table field
+ * @return array
+ */
+ public static function entityTables() {
+ $tables = array(
+ 'civicrm_event',
+ 'civicrm_contribution_page',
+ );
+ // Identical keys & values
+ return array_combine($tables, $tables);
+ }
+
}
return $fieldPerms;
}
+ /**
+ * Whitelist of possible values for the entity_table field
+ * @return array
+ */
+ public static function mailingGroupEntityTables() {
+ $tables = array(
+ 'civicrm_group',
+ 'civicrm_mailing',
+ );
+ // Identical keys & values
+ return array_combine($tables, $tables);
+ }
+
}
<title>Entity Table</title>
<length>64</length>
<comment>physical tablename for entity being joined to file, e.g. civicrm_contact</comment>
+ <pseudoconstant>
+ <optionGroupName>tag_used_for</optionGroupName>
+ </pseudoconstant>
<add>3.2</add>
</field>
<field>
<length>64</length>
<required>true</required>
<comment>Name of table where item being referenced is stored.</comment>
+ <pseudoconstant>
+ <callback>CRM_Core_BAO_Note::entityTables</callback>
+ </pseudoconstant>
<add>1.1</add>
</field>
<field>
<type>varchar</type>
<length>64</length>
<comment>Name of table where item being referenced is stored. Modules which only need a single collection of uf_join instances may choose not to populate entity_table and entity_id.</comment>
+ <pseudoconstant>CRM_Core_BAO_UFJoin::entityTables</pseudoconstant>
<add>1.3</add>
</field>
<field>
<length>64</length>
<required>true</required>
<comment>Name of table where item being referenced is stored.</comment>
+ <pseudoconstant>CRM_Mailing_BAO_Mailing::mailingGroupEntityTables</pseudoconstant>
</field>
<field>
<name>entity_id</name>