'class' => 'CRM_Batch_DAO_EntityBatch',
'table' => 'civicrm_entity_batch',
],
- 'CRM_Mailing_DAO_Component' => [
- 'name' => 'Component',
- 'class' => 'CRM_Mailing_DAO_Component',
+ 'CRM_Mailing_DAO_MailingComponent' => [
+ 'name' => 'MailingComponent',
+ 'class' => 'CRM_Mailing_DAO_MailingComponent',
'table' => 'civicrm_mailing_component',
],
'CRM_Mailing_DAO_MailingAB' => [
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2018
*/
-class CRM_Mailing_BAO_Component extends CRM_Mailing_DAO_Component {
+class CRM_Mailing_BAO_Component extends CRM_Mailing_DAO_MailingComponent {
/**
* Class constructor.
* @return CRM_Core_BAO_LocationType.
*/
public static function retrieve(&$params, &$defaults) {
- $component = new CRM_Mailing_DAO_Component();
+ $component = new CRM_Mailing_BAO_Component();
$component->copyValues($params);
if ($component->find(TRUE)) {
CRM_Core_DAO::storeValues($component, $defaults);
* true if we found and updated the object, else false
*/
public static function setIsActive($id, $is_active) {
- return CRM_Core_DAO::setFieldValue('CRM_Mailing_DAO_Component', $id, 'is_active', $is_active);
+ return CRM_Core_DAO::setFieldValue('CRM_Mailing_BAO_Component', $id, 'is_active', $is_active);
}
/**
*/
public static function add(&$params, $ids = array()) {
$id = CRM_Utils_Array::value('id', $params, CRM_Utils_Array::value('id', $ids));
- $component = new CRM_Mailing_DAO_Component();
+ $component = new CRM_Mailing_BAO_Component();
if ($id) {
$component->id = $id;
$component->find(TRUE);
*
* Generated from xml/schema/CRM/Mailing/Mailing.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:3e332257744be5cf9d7a2545f69f67eb)
+ * (GenCodeChecksum:3e943186d58d8e39d9765ce22d85ac79)
*/
/**
'entity' => 'Mailing',
'bao' => 'CRM_Mailing_BAO_Mailing',
'localizable' => 0,
- 'FKClassName' => 'CRM_Mailing_DAO_Component',
+ 'FKClassName' => 'CRM_Mailing_DAO_MailingComponent',
],
'footer_id' => [
'name' => 'footer_id',
'entity' => 'Mailing',
'bao' => 'CRM_Mailing_BAO_Mailing',
'localizable' => 0,
- 'FKClassName' => 'CRM_Mailing_DAO_Component',
+ 'FKClassName' => 'CRM_Mailing_DAO_MailingComponent',
],
'reply_id' => [
'name' => 'reply_id',
'entity' => 'Mailing',
'bao' => 'CRM_Mailing_BAO_Mailing',
'localizable' => 0,
- 'FKClassName' => 'CRM_Mailing_DAO_Component',
+ 'FKClassName' => 'CRM_Mailing_DAO_MailingComponent',
],
'unsubscribe_id' => [
'name' => 'unsubscribe_id',
'entity' => 'Mailing',
'bao' => 'CRM_Mailing_BAO_Mailing',
'localizable' => 0,
- 'FKClassName' => 'CRM_Mailing_DAO_Component',
+ 'FKClassName' => 'CRM_Mailing_DAO_MailingComponent',
],
'resubscribe_id' => [
'name' => 'resubscribe_id',
'entity' => 'Mailing',
'bao' => 'CRM_Mailing_BAO_Mailing',
'localizable' => 0,
- 'FKClassName' => 'CRM_Mailing_DAO_Component',
+ 'FKClassName' => 'CRM_Mailing_DAO_MailingComponent',
],
'name' => [
'name' => 'name',
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2018
*
- * Generated from xml/schema/CRM/Mailing/Component.xml
+ * Generated from xml/schema/CRM/Mailing/MailingComponent.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:33742feaa53eaba2c4a543c4e5c673ab)
+ * (GenCodeChecksum:08753305769bb8ac8d2824081322af92)
*/
/**
- * Database access object for the Component entity.
+ * Database access object for the MailingComponent entity.
*/
-class CRM_Mailing_DAO_Component extends CRM_Core_DAO {
+class CRM_Mailing_DAO_MailingComponent extends CRM_Core_DAO {
/**
* Static instance to hold the table name.
'title' => ts('Mailing Component ID'),
'required' => TRUE,
'table_name' => 'civicrm_mailing_component',
- 'entity' => 'Component',
- 'bao' => 'CRM_Mailing_BAO_Component',
+ 'entity' => 'MailingComponent',
+ 'bao' => 'CRM_Mailing_DAO_MailingComponent',
'localizable' => 0,
],
'name' => [
'maxlength' => 64,
'size' => CRM_Utils_Type::BIG,
'table_name' => 'civicrm_mailing_component',
- 'entity' => 'Component',
- 'bao' => 'CRM_Mailing_BAO_Component',
+ 'entity' => 'MailingComponent',
+ 'bao' => 'CRM_Mailing_DAO_MailingComponent',
'localizable' => 0,
],
'component_type' => [
'maxlength' => 12,
'size' => CRM_Utils_Type::TWELVE,
'table_name' => 'civicrm_mailing_component',
- 'entity' => 'Component',
- 'bao' => 'CRM_Mailing_BAO_Component',
+ 'entity' => 'MailingComponent',
+ 'bao' => 'CRM_Mailing_DAO_MailingComponent',
'localizable' => 0,
'html' => [
'type' => 'Select',
'maxlength' => 255,
'size' => CRM_Utils_Type::HUGE,
'table_name' => 'civicrm_mailing_component',
- 'entity' => 'Component',
- 'bao' => 'CRM_Mailing_BAO_Component',
+ 'entity' => 'MailingComponent',
+ 'bao' => 'CRM_Mailing_DAO_MailingComponent',
'localizable' => 0,
],
'body_html' => [
'rows' => 8,
'cols' => 80,
'table_name' => 'civicrm_mailing_component',
- 'entity' => 'Component',
- 'bao' => 'CRM_Mailing_BAO_Component',
+ 'entity' => 'MailingComponent',
+ 'bao' => 'CRM_Mailing_DAO_MailingComponent',
'localizable' => 0,
'html' => [
'type' => 'TextArea',
'rows' => 8,
'cols' => 80,
'table_name' => 'civicrm_mailing_component',
- 'entity' => 'Component',
- 'bao' => 'CRM_Mailing_BAO_Component',
+ 'entity' => 'MailingComponent',
+ 'bao' => 'CRM_Mailing_DAO_MailingComponent',
'localizable' => 0,
'html' => [
'type' => 'TextArea',
'description' => 'Is this the default component for this component_type?',
'default' => '0',
'table_name' => 'civicrm_mailing_component',
- 'entity' => 'Component',
- 'bao' => 'CRM_Mailing_BAO_Component',
+ 'entity' => 'MailingComponent',
+ 'bao' => 'CRM_Mailing_DAO_MailingComponent',
'localizable' => 0,
],
'is_active' => [
'title' => ts('Mailing Component Is Active?'),
'description' => 'Is this property active?',
'table_name' => 'civicrm_mailing_component',
- 'entity' => 'Component',
- 'bao' => 'CRM_Mailing_BAO_Component',
+ 'entity' => 'MailingComponent',
+ 'bao' => 'CRM_Mailing_DAO_MailingComponent',
'localizable' => 0,
],
];
$this->applyFilter(array('name', 'subject', 'body_html'), 'trim');
$this->add('text', 'name', ts('Name'),
- CRM_Core_DAO::getAttribute('CRM_Mailing_DAO_Component', 'name'), TRUE
+ CRM_Core_DAO::getAttribute('CRM_Mailing_BAO_Component', 'name'), TRUE
);
$this->addRule('name', ts('Name already exists in Database.'), 'objectExists', array(
- 'CRM_Mailing_DAO_Component',
+ 'CRM_Mailing_BAO_Component',
$this->_id,
));
$this->add('select', 'component_type', ts('Component Type'), CRM_Core_SelectValues::mailingComponents());
$this->add('text', 'subject', ts('Subject'),
- CRM_Core_DAO::getAttribute('CRM_Mailing_DAO_Component', 'subject'),
+ CRM_Core_DAO::getAttribute('CRM_Mailing_BAO_Component', 'subject'),
TRUE
);
$this->add('textarea', 'body_text', ts('Body - TEXT Format'),
- CRM_Core_DAO::getAttribute('CRM_Mailing_DAO_Component', 'body_text')
+ CRM_Core_DAO::getAttribute('CRM_Mailing_BAO_Component', 'body_text')
);
$this->add('textarea', 'body_html', ts('Body - HTML Format'),
- CRM_Core_DAO::getAttribute('CRM_Mailing_DAO_Component', 'body_html')
+ CRM_Core_DAO::getAttribute('CRM_Mailing_BAO_Component', 'body_html')
);
$this->addYesNo('is_default', ts('Default?'));
}
if (!$type) {
self::$component[$name] = NULL;
- CRM_Core_PseudoConstant::populate(self::$component[$name], 'CRM_Mailing_DAO_Component');
+ CRM_Core_PseudoConstant::populate(self::$component[$name], 'CRM_Mailing_BAO_Component');
}
else {
// we need to add an additional filter for $type
self::$component[$name] = array();
- $object = new CRM_Mailing_DAO_Component();
+ $object = new CRM_Mailing_BAO_Component();
$object->component_type = $type;
$object->selectAdd();
$object->selectAdd("id, name");
* API result array.
*/
function civicrm_api3_mailing_component_create($params) {
- return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params, 'Component');
+ return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params, 'MailingComponent');
}
if ($name == 'MailingRecipients') {
return 'CRM_Mailing_DAO_Recipients';
}
- // FIXME: DAO should be renamed CRM_Mailing_DAO_MailingComponent
- if ($name == 'MailingComponent') {
- return 'CRM_Mailing_DAO_Component';
- }
// FIXME: DAO should be renamed CRM_ACL_DAO_AclRole
if ($name == 'AclRole') {
return 'CRM_ACL_DAO_EntityRole';
'sample' => $campaign_name,
),
),
- 'CRM_Mailing_DAO_Component' => array(
+ 'CRM_Mailing_DAO_MailingComponent' => array(
array(
'fieldName' => 'component_type',
'sample' => 'Header',
<table>
<base>CRM/Mailing</base>
- <class>Component</class>
+ <class>MailingComponent</class>
<name>civicrm_mailing_component</name>
<comment>Stores information about the mailing components (header/footer).</comment>
<field>