Skip to content
Snippets Groups Projects
Commit d615ccf5 authored by colemanw's avatar colemanw
Browse files

CRM-14023 CRM-14015 - Add api for mailing component

parent d9d4f85f
No related branches found
No related tags found
No related merge requests found
<?php
/*
+--------------------------------------------------------------------+
| CiviCRM version 4.4 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2013 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| CiviCRM is free software; you can copy, modify, and distribute it |
| under the terms of the GNU Affero General Public License |
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
| |
| CiviCRM is distributed in the hope that it will be useful, but |
| WITHOUT ANY WARRANTY; without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| See the GNU Affero General Public License for more details. |
| |
| You should have received a copy of the GNU Affero General Public |
| License and the CiviCRM Licensing Exception along |
| with this program; if not, contact CiviCRM LLC |
| at info[AT]civicrm[DOT]org. If you have questions about the |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
*/
/**
* File for the CiviCRM APIv3 mailing_component functions
*
* @package CiviCRM_APIv3
* @subpackage API_mailing_component
*
*/
/**
* Save a mailing_component
*
* Allowed @params array keys are:
* {@getfields mailing_component_create}
* @example mailing_componentCreate.php
*
* @return array of newly created mailing_component property values.
* @access public
*/
function civicrm_api3_mailing_component_create($params) {
return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params);
}
/**
* Get a mailing_component
*
* Allowed @params array keys are:
* {@getfields mailing_component_get}
* @example mailing_componentCreate.php
*
* @return array of retrieved mailing_component property values.
* @access public
*/
function civicrm_api3_mailing_component_get($params) {
return _civicrm_api3_basic_get(_civicrm_api3_get_BAO(__FUNCTION__), $params);
}
/**
* Delete a mailing_component
*
* Allowed @params array keys are:
* {@getfields mailing_component_delete}
* @example mailing_componentCreate.php
*
* @return array of deleted values.
* @access public
*/
function civicrm_api3_mailing_component_delete($params) {
return _civicrm_api3_basic_delete(_civicrm_api3_get_BAO(__FUNCTION__), $params);
}
......@@ -294,6 +294,10 @@ function _civicrm_api3_get_DAO($name) {
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';
......
......@@ -46,8 +46,8 @@
<th></th>
</thead>
{foreach from=$rows item=row}
<tr id="row_{$row.id}" class="{cycle values="odd-row,even-row"} {$row.class}{if NOT $row.is_active} disabled{/if}">
<td>{$row.name}</td>
<tr id="mailing_component-{$row.id}" class="crm-entity {cycle values="odd-row,even-row"} {$row.class}{if NOT $row.is_active} disabled{/if}">
<td class="crm-editable" data-field="name">{$row.name}</td>
<td>{$row.component_type}</td>
<td>{$row.subject}</td>
<td>{$row.body_text}</td>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment