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


PHP CRM_Utils_Recent::get方法代码示例

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


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

示例1: testAddCaseToContact

 public function testAddCaseToContact()
 {
     $params = array('case_id' => 1, 'contact_id' => 17);
     CRM_Case_BAO_CaseContact::create($params);
     $recent = CRM_Utils_Recent::get();
     $this->assertEquals('Test Contact - Housing Support', $recent[0]['title']);
 }
开发者ID:konadave,项目名称:civicrm-core,代码行数:7,代码来源:CaseTest.php

示例2: CRM_Core_Smarty

 /**
  * class constructor
  *
  * @return CRM_Core_Smarty
  * @access private
  */
 function CRM_Core_Smarty()
 {
     parent::Smarty();
     $config =& CRM_Core_Config::singleton();
     $this->template_dir = $config->templateDir;
     $this->compile_dir = $config->templateCompileDir;
     $this->use_sub_dirs = true;
     $this->plugins_dir = array($config->smartyDir . 'plugins', $config->pluginsDir);
     // add the session and the config here
     $config =& CRM_Core_Config::singleton();
     $session =& CRM_Core_Session::singleton();
     $recent =& CRM_Utils_Recent::get();
     $this->assign_by_ref('config', $config);
     $this->assign_by_ref('session', $session);
     $this->assign_by_ref('recentlyViewed', $recent);
     $this->assign('displayRecent', true);
     $this->register_function('crmURL', array('CRM_Utils_System', 'crmURL'));
 }
开发者ID:bhirsch,项目名称:voipdrupal-4.7-1.0,代码行数:24,代码来源:Smarty.php

示例3: setTemplateValues

 /**
  * Set the post action values for the block.
  *
  * php is lame and u cannot call functions from static initializers
  * hence this hack
  *
  * @param int $id
  *
  * @return void
  */
 private static function setTemplateValues($id)
 {
     switch ($id) {
         case self::CREATE_NEW:
             self::setTemplateShortcutValues();
             break;
         case self::DASHBOARD:
             self::setTemplateDashboardValues();
             break;
         case self::ADD:
             $defaultLocation = CRM_Core_BAO_LocationType::getDefault();
             $defaultPrimaryLocationId = $defaultLocation->id;
             $values = array('postURL' => CRM_Utils_System::url('civicrm/contact/add', 'reset=1&ct=Individual'), 'primaryLocationType' => $defaultPrimaryLocationId);
             foreach (CRM_Contact_BAO_Contact::$_greetingTypes as $greeting) {
                 $values[$greeting . '_id'] = CRM_Contact_BAO_Contact_Utils::defaultGreeting('Individual', $greeting);
             }
             self::setProperty(self::ADD, 'templateValues', $values);
             break;
         case self::LANGSWITCH:
             // gives the currentPath without trailing empty lcMessages to be completed
             $values = array('queryString' => CRM_Utils_System::getLinksUrl('lcMessages', TRUE, FALSE, FALSE));
             self::setProperty(self::LANGSWITCH, 'templateValues', $values);
             break;
         case self::FULLTEXT_SEARCH:
             $urlArray = array('fullTextSearchID' => CRM_Core_DAO::getFieldValue('CRM_Core_DAO_OptionValue', 'CRM_Contact_Form_Search_Custom_FullText', 'value', 'name'));
             self::setProperty(self::FULLTEXT_SEARCH, 'templateValues', $urlArray);
             break;
         case self::RECENTLY_VIEWED:
             $recent = CRM_Utils_Recent::get();
             self::setProperty(self::RECENTLY_VIEWED, 'templateValues', array('recentlyViewed' => $recent));
             break;
         case self::EVENT:
             self::setTemplateEventValues();
             break;
     }
 }
开发者ID:utkarshsharma,项目名称:civicrm-core,代码行数:46,代码来源:Block.php

示例4: setTemplateValues

 /**
  * set the post action values for the block.
  *
  * php is lame and u cannot call functions from static initializers
  * hence this hack
  *
  * @return void
  * @access private
  */
 private function setTemplateValues($id)
 {
     switch ($id) {
         case self::CREATE_NEW:
             self::setTemplateShortcutValues();
             break;
         case self::DASHBOARD:
             self::setTemplateDashboardValues();
             break;
         case self::ADD:
             require_once "CRM/Core/BAO/LocationType.php";
             $defaultLocation =& CRM_Core_BAO_LocationType::getDefault();
             $defaultPrimaryLocationId = $defaultLocation->id;
             $values = array('postURL' => CRM_Utils_System::url('civicrm/contact/add', 'reset=1&ct=Individual'), 'primaryLocationType' => $defaultPrimaryLocationId);
             self::setProperty(self::ADD, 'templateValues', $values);
             break;
         case self::FULLTEXT_SEARCH:
             $urlArray = array('fullTextSearchID' => CRM_Core_DAO::getFieldValue('CRM_Core_DAO_OptionValue', 'CRM_Contact_Form_Search_Custom_FullText', 'value', 'name'));
             self::setProperty(self::FULLTEXT_SEARCH, 'templateValues', $urlArray);
             break;
         case self::CIVICRM_CONTENT:
             break;
         case self::RECENTLY_VIEWED:
             require_once 'CRM/Utils/Recent.php';
             $recent =& CRM_Utils_Recent::get();
             self::setProperty(self::RECENTLY_VIEWED, 'templateValues', array('recentlyViewed' => $recent));
             break;
         case self::EVENT:
             self::setTemplateEventValues();
             break;
     }
 }
开发者ID:bhirsch,项目名称:civicrm,代码行数:41,代码来源:Block.php


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