本文整理汇总了PHP中CRM_Mailing_DAO_Mailing::fields方法的典型用法代码示例。如果您正苦于以下问题:PHP CRM_Mailing_DAO_Mailing::fields方法的具体用法?PHP CRM_Mailing_DAO_Mailing::fields怎么用?PHP CRM_Mailing_DAO_Mailing::fields使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CRM_Mailing_DAO_Mailing
的用法示例。
在下文中一共展示了CRM_Mailing_DAO_Mailing::fields方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _civicrm_api3_mailing_a_b_submit_spec
/**
* Adjust Metadata for submit action.
*
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $spec
* Array of parameters determined by getfields.
*/
function _civicrm_api3_mailing_a_b_submit_spec(&$spec)
{
$mailingFields = CRM_Mailing_DAO_Mailing::fields();
$mailingAbFields = CRM_Mailing_DAO_MailingAB::fields();
$spec['id'] = $mailingAbFields['id'];
$spec['status'] = $mailingAbFields['status'];
$spec['scheduled_date'] = $mailingFields['scheduled_date'];
$spec['approval_date'] = $mailingFields['approval_date'];
$spec['approval_status_id'] = $mailingFields['approval_status_id'];
$spec['approval_note'] = $mailingFields['approval_note'];
// Note: we'll pass through approval_* fields to the underlying mailing, but they may be ignored
// if the user doesn't have suitable permission. If separate approvals are required, they must be provided
// outside the A/B Test UI.
}
示例2: _civicrm_api3_mailing_submit_spec
/**
* Adjust metadata for mailing submit api function.
*
* @param array $spec
*/
function _civicrm_api3_mailing_submit_spec(&$spec)
{
$mailingFields = CRM_Mailing_DAO_Mailing::fields();
$spec['id'] = $mailingFields['id'];
$spec['scheduled_date'] = $mailingFields['scheduled_date'];
$spec['approval_date'] = $mailingFields['approval_date'];
$spec['approval_status_id'] = $mailingFields['approval_status_id'];
$spec['approval_note'] = $mailingFields['approval_note'];
// _skip_evil_bao_auto_recipients_: bool
}
示例3: getWorkflowFieldPerms
/**
* Get a list of permissions required for CRUD'ing each field
* (when workflow is enabled).
*
* @return array
* Array (string $fieldName => string $permName)
*/
public static function getWorkflowFieldPerms()
{
$fieldNames = array_keys(CRM_Mailing_DAO_Mailing::fields());
$fieldPerms = array();
foreach ($fieldNames as $fieldName) {
if ($fieldName == 'id') {
$fieldPerms[$fieldName] = array(array('access CiviMail', 'schedule mailings', 'approve mailings', 'create mailings'));
} elseif (in_array($fieldName, array('scheduled_date', 'scheduled_id'))) {
$fieldPerms[$fieldName] = array(array('access CiviMail', 'schedule mailings'));
} elseif (in_array($fieldName, array('approval_date', 'approver_id', 'approval_status_id', 'approval_note'))) {
$fieldPerms[$fieldName] = array(array('access CiviMail', 'approve mailings'));
} else {
$fieldPerms[$fieldName] = array(array('access CiviMail', 'create mailings'));
}
}
return $fieldPerms;
}
示例4: array
/**
* returns the list of fields that can be exported
*
* @access public
* return array
*/
function &export($prefix = false)
{
if (!$GLOBALS['_CRM_MAILING_DAO_MAILING']['_export']) {
$GLOBALS['_CRM_MAILING_DAO_MAILING']['_export'] = array();
$fields =& CRM_Mailing_DAO_Mailing::fields();
foreach ($fields as $name => $field) {
if (CRM_Utils_Array::value('export', $field)) {
if ($prefix) {
$GLOBALS['_CRM_MAILING_DAO_MAILING']['_export']['mailing'] =& $fields[$name];
} else {
$GLOBALS['_CRM_MAILING_DAO_MAILING']['_export'][$name] =& $fields[$name];
}
}
}
}
return $GLOBALS['_CRM_MAILING_DAO_MAILING']['_export'];
}