本文整理汇总了PHP中CRM_Core_BAO_ActionSchedule::getList方法的典型用法代码示例。如果您正苦于以下问题:PHP CRM_Core_BAO_ActionSchedule::getList方法的具体用法?PHP CRM_Core_BAO_ActionSchedule::getList怎么用?PHP CRM_Core_BAO_ActionSchedule::getList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CRM_Core_BAO_ActionSchedule
的用法示例。
在下文中一共展示了CRM_Core_BAO_ActionSchedule::getList方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: preProcess
/**
* Function to set variables up before form is built
*
* @return void
* @access public
*/
function preProcess()
{
parent::preProcess();
$newReminder = CRM_Utils_Request::retrieve('new', 'Boolean', $this, FALSE, FALSE);
if ($this->_action & CRM_Core_Action::UPDATE && !$newReminder) {
$field = 'civicrm_event';
if ($this->_isTemplate) {
$field = 'event_template';
}
$reminderList = CRM_Core_BAO_ActionSchedule::getList(FALSE, $field, $this->_id);
if ($reminderList && is_array($reminderList)) {
// Add action links to each of the reminders
foreach ($reminderList as &$format) {
$action = CRM_Core_Action::UPDATE + CRM_Core_Action::DELETE;
if ($format['is_active']) {
$action += CRM_Core_Action::DISABLE;
} else {
$action += CRM_Core_Action::ENABLE;
}
$links = CRM_Admin_Page_ScheduleReminders::links();
$links[CRM_Core_Action::DELETE]['qs'] .= "&context=event&eventId={$this->_id}";
$links[CRM_Core_Action::UPDATE]['qs'] .= "&context=event&eventId={$this->_id}";
$format['action'] = CRM_Core_Action::formLink($links, $action, array('id' => $format['id']), ts('more'), FALSE, 'event.reminder.list', 'Event', $this->_id);
}
} else {
$reminderList = TRUE;
}
$this->assign('rows', $reminderList);
// Update tab "disabled" css class
$this->ajaxResponse['tabValid'] = !empty($reminderList) && is_array($reminderList);
}
}
示例2: preProcess
/**
* Set variables up before form is built.
*
* @return void
*/
public function preProcess()
{
parent::preProcess();
$setTab = CRM_Utils_Request::retrieve('setTab', 'Int', $this, FALSE, 0);
$mapping = CRM_Utils_Array::first(CRM_Core_BAO_ActionSchedule::getMappings(array('id' => $this->_isTemplate ? CRM_Event_ActionMapping::EVENT_TPL_MAPPING_ID : CRM_Event_ActionMapping::EVENT_NAME_MAPPING_ID)));
$reminderList = CRM_Core_BAO_ActionSchedule::getList(FALSE, $mapping, $this->_id);
if ($reminderList && is_array($reminderList)) {
// Add action links to each of the reminders
foreach ($reminderList as &$format) {
$action = CRM_Core_Action::UPDATE + CRM_Core_Action::DELETE;
if ($format['is_active']) {
$action += CRM_Core_Action::DISABLE;
} else {
$action += CRM_Core_Action::ENABLE;
}
$scheduleReminder = new CRM_Admin_Page_ScheduleReminders();
$links = $scheduleReminder->links();
$links[CRM_Core_Action::DELETE]['qs'] .= "&context=event&compId={$this->_id}";
$links[CRM_Core_Action::UPDATE]['qs'] .= "&context=event&compId={$this->_id}";
$format['action'] = CRM_Core_Action::formLink($links, $action, array('id' => $format['id']), ts('more'), FALSE, 'actionSchedule.manage.action', 'ActionSchedule', $this->_id);
}
}
$this->assign('rows', $reminderList);
$this->assign('setTab', $setTab);
$this->assign('component', 'event');
// Update tab "disabled" css class
$this->ajaxResponse['tabValid'] = is_array($reminderList) && count($reminderList) > 0;
$this->setPageTitle(ts('Scheduled Reminder'));
}
示例3: preProcess
/**
* Function to set variables up before form is built
*
* @return void
* @access public
*/
function preProcess()
{
parent::preProcess();
$newReminder = CRM_Utils_Request::retrieve('new', 'Boolean', $this, FALSE, FALSE);
if ($this->_action & CRM_Core_Action::UPDATE && !$newReminder) {
$reminderList = CRM_Core_BAO_ActionSchedule::getList(FALSE, 'civicrm_event', $this->_id);
if (is_array($reminderList)) {
// Add action links to each of the reminders
foreach ($reminderList as &$format) {
$action = CRM_Core_Action::UPDATE + CRM_Core_Action::DELETE;
if ($format['is_active']) {
$action += CRM_Core_Action::DISABLE;
} else {
$action += CRM_Core_Action::ENABLE;
}
$links = CRM_Admin_Page_ScheduleReminders::links();
$links[CRM_Core_Action::DELETE]['qs'] .= "&context=event&eventId={$this->_id}";
$links[CRM_Core_Action::UPDATE]['qs'] .= "&context=event&eventId={$this->_id}";
$format['action'] = CRM_Core_Action::formLink($links, $action, array('id' => $format['id']));
}
$this->assign('rows', $reminderList);
}
}
}
示例4: browse
/**
* Browse all Scheduled Reminders settings.
*
* @param null $action
*
* @return void
*/
public function browse($action = NULL)
{
// Get list of configured reminders
$reminderList = CRM_Core_BAO_ActionSchedule::getList();
if (is_array($reminderList)) {
// Add action links to each of the reminders
foreach ($reminderList as &$format) {
$action = array_sum(array_keys($this->links()));
if ($format['is_active']) {
$action -= CRM_Core_Action::ENABLE;
} else {
$action -= CRM_Core_Action::DISABLE;
}
$format['action'] = CRM_Core_Action::formLink(self::links(), $action, array('id' => $format['id']), ts('more'), FALSE, 'actionSchedule.manage.action', 'ActionSchedule', $format['id']);
}
}
$this->assign('rows', $reminderList);
}
示例5: browse
/**
* Browse all Scheduled Reminders settings.
*
* @param null $action
*
* @return void
*/
public function browse($action = NULL)
{
//CRM-16777: Do not permit access to user, for page 'Administer->Communication->Schedule Reminder',
//when do not have 'administer CiviCRM' permission.
if (!CRM_Core_Permission::check('administer CiviCRM')) {
CRM_Core_Error::fatal(ts('You do not have permission to access this page.'));
}
// Get list of configured reminders
$reminderList = CRM_Core_BAO_ActionSchedule::getList();
if (is_array($reminderList)) {
// Add action links to each of the reminders
foreach ($reminderList as &$format) {
$action = array_sum(array_keys($this->links()));
if ($format['is_active']) {
$action -= CRM_Core_Action::ENABLE;
} else {
$action -= CRM_Core_Action::DISABLE;
}
$format['action'] = CRM_Core_Action::formLink(self::links(), $action, array('id' => $format['id']), ts('more'), FALSE, 'actionSchedule.manage.action', 'ActionSchedule', $format['id']);
}
}
$this->assign('rows', $reminderList);
}