當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。