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


PHP CRM_Event_BAO_Event::getCompleteInfo方法代码示例

本文整理汇总了PHP中CRM_Event_BAO_Event::getCompleteInfo方法的典型用法代码示例。如果您正苦于以下问题:PHP CRM_Event_BAO_Event::getCompleteInfo方法的具体用法?PHP CRM_Event_BAO_Event::getCompleteInfo怎么用?PHP CRM_Event_BAO_Event::getCompleteInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CRM_Event_BAO_Event的用法示例。


在下文中一共展示了CRM_Event_BAO_Event::getCompleteInfo方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: run

 /**
  * Heart of the iCalendar data assignment process. The runner gets all the meta
  * data for the event and calls the  method to output the iCalendar
  * to the user. If gData param is passed on the URL, outputs gData XML format.
  * Else outputs iCalendar format per IETF RFC2445. Page param true means send
  * to browser as inline content. Else, we send .ics file as attachment.
  *
  * @return void
  */
 public function run()
 {
     $id = CRM_Utils_Request::retrieve('id', 'Positive', $this, FALSE, NULL, 'GET');
     $type = CRM_Utils_Request::retrieve('type', 'Positive', $this, FALSE, 0);
     $start = CRM_Utils_Request::retrieve('start', 'Positive', $this, FALSE, 0);
     $end = CRM_Utils_Request::retrieve('end', 'Positive', $this, FALSE, 0);
     $iCalPage = CRM_Utils_Request::retrieve('list', 'Positive', $this, FALSE, 0);
     $gData = CRM_Utils_Request::retrieve('gData', 'Positive', $this, FALSE, 0);
     $html = CRM_Utils_Request::retrieve('html', 'Positive', $this, FALSE, 0);
     $rss = CRM_Utils_Request::retrieve('rss', 'Positive', $this, FALSE, 0);
     $info = CRM_Event_BAO_Event::getCompleteInfo($start, $type, $id, $end, false);
     $this->assign('events', $info);
     $this->assign('timezone', @date_default_timezone_get());
     // Send data to the correct template for formatting (iCal vs. gData)
     $template = CRM_Core_Smarty::singleton();
     $config = CRM_Core_Config::singleton();
     if ($rss) {
         // rss 2.0 requires lower case dash delimited locale
         $this->assign('rssLang', str_replace('_', '-', strtolower($config->lcMessages)));
         $calendar = $template->fetch('CRM/Core/Calendar/Rss.tpl');
     } elseif ($gData) {
         $calendar = $template->fetch('CRM/Core/Calendar/GData.tpl');
     } elseif ($html) {
         // check if we're in shopping cart mode for events
         $enable_cart = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::EVENT_PREFERENCES_NAME, 'enable_cart');
         if ($enable_cart) {
             $this->assign('registration_links', TRUE);
         }
         return parent::run();
     } else {
         $calendar = $template->fetch('CRM/Core/Calendar/ICal.tpl');
         $calendar = preg_replace('/(?<!\\r)\\n/', "\r\n", $calendar);
     }
     // Push output for feed or download
     if ($iCalPage == 1) {
         if ($gData || $rss) {
             CRM_Utils_ICalendar::send($calendar, 'text/xml', 'utf-8');
         } else {
             CRM_Utils_ICalendar::send($calendar, 'text/plain', 'utf-8');
         }
     } else {
         CRM_Utils_ICalendar::send($calendar, 'text/calendar', 'utf-8', 'civicrm_ical.ics', 'attachment');
     }
     CRM_Utils_System::civiExit();
 }
开发者ID:CiviCooP,项目名称:org.civicoop.eventprivateical,代码行数:54,代码来源:Ical.php

示例2: run

 /**
  * Heart of the iCalendar data assignment process. The runner gets all the meta
  * data for the event and calls the  method to output the iCalendar
  * to the user. If gData param is passed on the URL, outputs gData XML format.
  * Else outputs iCalendar format per IETF RFC2445. Page param true means send
  * to browser as inline content. Else, we send .ics file as attachment.
  *
  * @return void
  */
 function run()
 {
     require_once "CRM/Utils/Request.php";
     $id = CRM_Utils_Request::retrieve('id', 'Positive', $this, false, null, 'GET');
     $type = CRM_Utils_Request::retrieve('type', 'Positive', $this, false, 0);
     $start = CRM_Utils_Request::retrieve('start', 'Positive', $this, false, 0);
     $end = CRM_Utils_Request::retrieve('end', 'Positive', $this, false, 0);
     $iCalPage = CRM_Utils_Request::retrieve('page', 'Positive', $this, false, 0);
     $gData = CRM_Utils_Request::retrieve('gData', 'Positive', $this, false, 0);
     $html = CRM_Utils_Request::retrieve('html', 'Positive', $this, false, 0);
     $rss = CRM_Utils_Request::retrieve('rss', 'Positive', $this, false, 0);
     require_once "CRM/Event/BAO/Event.php";
     $info = CRM_Event_BAO_Event::getCompleteInfo($start, $type, $id, $end);
     $this->assign('events', $info);
     // Send data to the correct template for formatting (iCal vs. gData)
     $template = CRM_Core_Smarty::singleton();
     $config = CRM_Core_Config::singleton();
     if ($rss) {
         // rss 2.0 requires lower case dash delimited locale
         $this->assign('rssLang', str_replace('_', '-', strtolower($config->lcMessages)));
         $calendar = $template->fetch('CRM/Core/Calendar/Rss.tpl');
     } else {
         if ($gData) {
             $calendar = $template->fetch('CRM/Core/Calendar/GData.tpl');
         } else {
             if ($html) {
                 return parent::run();
             } else {
                 $calendar = $template->fetch('CRM/Core/Calendar/ICal.tpl');
             }
         }
     }
     // Push output for feed or download
     require_once "CRM/Utils/ICalendar.php";
     if ($iCalPage == 1) {
         if ($gData || $rss) {
             CRM_Utils_ICalendar::send($calendar, 'text/xml', 'utf-8');
         } else {
             CRM_Utils_ICalendar::send($calendar, 'text/plain', 'utf-8');
         }
     } else {
         CRM_Utils_ICalendar::send($calendar, 'text/calendar', 'utf-8', 'civicrm_ical.ics', 'attachment');
     }
     CRM_Utils_System::civiExit();
 }
开发者ID:hampelm,项目名称:Ginsberg-CiviDemo,代码行数:54,代码来源:ICalendar.php

示例3: setTemplateEventValues

 /**
  * Create the event blocks for upcoming events.
  *
  * @return void
  */
 private static function setTemplateEventValues()
 {
     $config = CRM_Core_Config::singleton();
     $info = CRM_Event_BAO_Event::getCompleteInfo(date("Ymd"));
     if ($info) {
         $session = CRM_Core_Session::singleton();
         // check if registration link should be displayed
         foreach ($info as $id => $event) {
             //@todo FIXME  - validRegistraionRequest takes eventID not contactID as a param
             // this is called via an obscure patch from Joomla event block rendering (only)
             $info[$id]['onlineRegistration'] = CRM_Event_BAO_Event::validRegistrationRequest($event, $session->get('userID'));
         }
         self::setProperty(self::EVENT, 'templateValues', array('eventBlock' => $info));
     }
 }
开发者ID:utkarshsharma,项目名称:civicrm-core,代码行数:20,代码来源:Block.php

示例4: setTemplateEventValues

 /**
  * create the event blocks for upcoming events
  *
  * @return void
  * @access private
  */
 private function setTemplateEventValues()
 {
     $config =& CRM_Core_Config::singleton();
     require_once 'CRM/Event/BAO/Event.php';
     $info = CRM_Event_BAO_Event::getCompleteInfo();
     if ($info) {
         $session =& CRM_Core_Session::singleton();
         // check if registration link should be displayed
         foreach ($info as $id => $event) {
             $info[$id]['onlineRegistration'] = CRM_Event_BAO_Event::validRegistrationDate($event, $session->get('userID'));
         }
         self::setProperty(self::EVENT, 'templateValues', array('eventBlock' => $info));
     }
 }
开发者ID:bhirsch,项目名称:civicrm,代码行数:20,代码来源:Block.php


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