*
* Generated from xml/schema/CRM/Mailing/Mailing.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:c294c497dac6129fe311fe8484e1e975)
+ * (GenCodeChecksum:aa54484f6e9b8d5ad8e75680f95cfc67)
*/
/**
'bao' => 'CRM_Mailing_BAO_Mailing',
'localizable' => 0,
'FKClassName' => 'CRM_Mailing_DAO_MailingComponent',
+ 'pseudoconstant' => [
+ 'table' => 'civicrm_mailing_component',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'name',
+ 'condition' => 'component_type = "Header"',
+ ],
],
'footer_id' => [
'name' => 'footer_id',
'bao' => 'CRM_Mailing_BAO_Mailing',
'localizable' => 0,
'FKClassName' => 'CRM_Mailing_DAO_MailingComponent',
+ 'pseudoconstant' => [
+ 'table' => 'civicrm_mailing_component',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'name',
+ 'condition' => 'component_type = "Footer"',
+ ],
],
'reply_id' => [
'name' => 'reply_id',
$this->assertTrue(isset($types['values']['traditional']));
}
+ /**
+ * Check that default header+footer are available.
+ */
+ public function testHeaderFooterOptions() {
+ $headers = $this->callAPISuccess('Mailing', 'getoptions', ['field' => 'header']);
+ $this->assertTrue(in_array('Mailing Header', $headers['values']));
+ $footers = $this->callAPISuccess('Mailing', 'getoptions', ['field' => 'footer']);
+ $this->assertTrue(in_array('Mailing Footer', $footers['values']));
+ }
+
/**
* The `template_options` field should be treated a JSON object.
*
<name>header_id</name>
<title>Mailing Header</title>
<type>int unsigned</type>
+ <pseudoconstant>
+ <table>civicrm_mailing_component</table>
+ <keyColumn>id</keyColumn>
+ <labelColumn>name</labelColumn>
+ <condition>component_type = "Header"</condition>
+ </pseudoconstant>
<comment>FK to the header component.</comment>
</field>
<foreignKey>
<name>footer_id</name>
<title>Mailing Footer</title>
<type>int unsigned</type>
+ <pseudoconstant>
+ <table>civicrm_mailing_component</table>
+ <keyColumn>id</keyColumn>
+ <labelColumn>name</labelColumn>
+ <condition>component_type = "Footer"</condition>
+ </pseudoconstant>
<comment>FK to the footer component.</comment>
</field>
<foreignKey>