Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
justinfreeman (Agileware)
Core
Commits
d615ccf5
Commit
d615ccf5
authored
11 years ago
by
colemanw
Browse files
Options
Downloads
Patches
Plain Diff
CRM-14023 CRM-14015 - Add api for mailing component
parent
d9d4f85f
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
api/v3/MailingComponent.php
+77
-0
77 additions, 0 deletions
api/v3/MailingComponent.php
api/v3/utils.php
+4
-0
4 additions, 0 deletions
api/v3/utils.php
templates/CRM/Mailing/Page/Component.tpl
+2
-2
2 additions, 2 deletions
templates/CRM/Mailing/Page/Component.tpl
with
83 additions
and
2 deletions
api/v3/MailingComponent.php
0 → 100644
+
77
−
0
View file @
d615ccf5
<?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
);
}
This diff is collapsed.
Click to expand it.
api/v3/utils.php
+
4
−
0
View file @
d615ccf5
...
...
@@ -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'
;
...
...
This diff is collapsed.
Click to expand it.
templates/CRM/Mailing/Page/Component.tpl
+
2
−
2
View file @
d615ccf5
...
...
@@ -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>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment