当前位置: 首页>>代码示例>>PHP>>正文


PHP CRM_Core_BAO_ActionSchedule::getList方法代码示例

本文整理汇总了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);
     }
 }
开发者ID:archcidburnziso,项目名称:civicrm-core,代码行数:38,代码来源:ScheduleReminders.php

示例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'));
 }
开发者ID:nielosz,项目名称:civicrm-core,代码行数:34,代码来源:ScheduleReminders.php

示例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);
         }
     }
 }
开发者ID:peteainsworth,项目名称:civicrm-4.2.9-drupal,代码行数:30,代码来源:ScheduleReminders.php

示例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);
 }
开发者ID:JSProffitt,项目名称:civicrm-website-org,代码行数:25,代码来源:ScheduleReminders.php

示例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);
 }
开发者ID:kidaa30,项目名称:yes,代码行数:30,代码来源:ScheduleReminders.php


注:本文中的CRM_Core_BAO_ActionSchedule::getList方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。