當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CRM_Utils_System::getSiteID方法代碼示例

本文整理匯總了PHP中CRM_Utils_System::getSiteID方法的典型用法代碼示例。如果您正苦於以下問題:PHP CRM_Utils_System::getSiteID方法的具體用法?PHP CRM_Utils_System::getSiteID怎麽用?PHP CRM_Utils_System::getSiteID使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CRM_Utils_System的用法示例。


在下文中一共展示了CRM_Utils_System::getSiteID方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: run

 /**
  * @return string
  */
 public function run()
 {
     CRM_Utils_System::setTitle(ts("Configuration Checklist"));
     $this->assign('recentlyViewed', FALSE);
     $destination = CRM_Utils_System::url('civicrm/admin/configtask', 'reset=1', FALSE, NULL, FALSE);
     $destination = urlencode($destination);
     $this->assign('destination', $destination);
     $this->assign('registerSite', htmlspecialchars('https://civicrm.org/register-your-site?src=iam&sid=' . CRM_Utils_System::getSiteID()));
     return parent::run();
 }
開發者ID:indydas,項目名稱:civi-demo,代碼行數:13,代碼來源:ConfigTaskList.php

示例2: run

 /**
  * Run page.
  *
  * @return string
  */
 public function run()
 {
     Civi::resources()->addStyleFile('civicrm', 'css/admin.css');
     $this->assign('registerSite', htmlspecialchars('https://civicrm.org/register-your-site?src=iam&sid=' . CRM_Utils_System::getSiteID()));
     $groups = array('Customize Data and Screens' => ts('Customize Data and Screens'), 'Communications' => ts('Communications'), 'Localization' => ts('Localization'), 'Users and Permissions' => ts('Users and Permissions'), 'System Settings' => ts('System Settings'));
     $config = CRM_Core_Config::singleton();
     if (in_array('CiviContribute', $config->enableComponents)) {
         $groups['CiviContribute'] = ts('CiviContribute');
     }
     if (in_array('CiviMember', $config->enableComponents)) {
         $groups['CiviMember'] = ts('CiviMember');
     }
     if (in_array('CiviEvent', $config->enableComponents)) {
         $groups['CiviEvent'] = ts('CiviEvent');
     }
     if (in_array('CiviMail', $config->enableComponents)) {
         $groups['CiviMail'] = ts('CiviMail');
     }
     if (in_array('CiviCase', $config->enableComponents)) {
         $groups['CiviCase'] = ts('CiviCase');
     }
     if (in_array('CiviReport', $config->enableComponents)) {
         $groups['CiviReport'] = ts('CiviReport');
     }
     if (in_array('CiviCampaign', $config->enableComponents)) {
         $groups['CiviCampaign'] = ts('CiviCampaign');
     }
     $values = CRM_Core_Menu::getAdminLinks();
     $this->_showHide = new CRM_Core_ShowHideBlocks();
     foreach ($groups as $group => $title) {
         $groupId = str_replace(' ', '_', $group);
         $this->_showHide->addShow("id_{$groupId}_show");
         $this->_showHide->addHide("id_{$groupId}");
         $v = CRM_Core_ShowHideBlocks::links($this, $groupId, '', '', FALSE);
         if (isset($values[$group])) {
             $adminPanel[$groupId] = $values[$group];
             $adminPanel[$groupId]['show'] = $v['show'];
             $adminPanel[$groupId]['hide'] = $v['hide'];
             $adminPanel[$groupId]['title'] = $title;
         } else {
             $adminPanel[$groupId] = array();
             $adminPanel[$groupId]['show'] = '';
             $adminPanel[$groupId]['hide'] = '';
             $adminPanel[$groupId]['title'] = $title;
         }
     }
     $this->assign('adminPanel', $adminPanel);
     $this->_showHide->addToTemplate();
     return parent::run();
 }
開發者ID:kcristiano,項目名稱:civicrm-core,代碼行數:55,代碼來源:Admin.php

示例3: runFinish

 /**
  * Display any final messages, clear caches, etc
  */
 public function runFinish()
 {
     $upgrade = new CRM_Upgrade_Form();
     $template = CRM_Core_Smarty::singleton();
     // If we're redirected from queue-runner, then isUpgradePending=true.
     // If user then reloads the finish page, the isUpgradePending will be unset. (Because the session has been cleared.)
     if ($this->get('isUpgradePending')) {
         // TODO: Use structured message store
         $postUpgradeMessage = file_get_contents($this->get('postUpgradeMessageFile'));
         // This destroys $session, so do it after get('postUpgradeMessageFile')
         CRM_Upgrade_Form::doFinish();
     } else {
         $postUpgradeMessage = '';
         // Session was destroyed! Can't recover messages.
     }
     // do a version check - after doFinish() sets the final version
     list($currentVer, $latestVer) = $upgrade->getUpgradeVersions();
     if ($error = $upgrade->checkCurrentVersion($currentVer, $latestVer)) {
         CRM_Core_Error::fatal($error);
     }
     $template->assign('message', $postUpgradeMessage);
     $template->assign('upgraded', TRUE);
     $template->assign('sid', CRM_Utils_System::getSiteID());
     // Render page header
     if (!defined('CIVICRM_UF_HEAD') && ($region = CRM_Core_Region::instance('html-header', FALSE))) {
         CRM_Utils_System::addHTMLHead($region->render(''));
     }
     $content = $template->fetch('CRM/common/success.tpl');
     echo CRM_Utils_System::theme($content, $this->_print, TRUE);
 }
開發者ID:rameshrr99,項目名稱:civicrm-core,代碼行數:33,代碼來源:Upgrade.php

示例4: evalMarkup

 /**
  * @param string $markup
  * @return string
  */
 public static function evalMarkup($markup)
 {
     $config = CRM_Core_Config::singleton();
     $vals = array('resourceUrl' => rtrim($config->resourceBase, '/'), 'ver' => CRM_Utils_System::version(), 'uf' => $config->userFramework, 'php' => phpversion(), 'sid' => CRM_Utils_System::getSiteID(), 'baseUrl' => $config->userFrameworkBaseURL, 'lang' => $config->lcMessages, 'co' => $config->defaultContactCountry);
     $vars = array();
     foreach ($vals as $k => $v) {
         $vars['%%' . $k . '%%'] = $v;
         $vars['{{' . $k . '}}'] = urlencode($v);
     }
     return strtr($markup, $vars);
 }
開發者ID:kcristiano,項目名稱:civicrm-core,代碼行數:15,代碼來源:CommunityMessages.php

示例5: run

 /**
  * @return string
  */
 public function run()
 {
     $errorMessage = '';
     // ensure that all CiviCRM tables are InnoDB, else abort
     // this is not a very fast operation, so we do it randomly 10% of the times
     // but we do it for most / all tables
     // http://bugs.mysql.com/bug.php?id=43664
     if (rand(1, 10) == 3 && CRM_Core_DAO::isDBMyISAM(150)) {
         $errorMessage = ts('Your database is configured to use the MyISAM database engine. CiviCRM requires InnoDB. You will need to convert any MyISAM tables in your database to InnoDB. Using MyISAM tables will result in data integrity issues.');
         CRM_Core_Session::setStatus($errorMessage, ts('Warning'), "alert");
     }
     if (!CRM_Utils_System::isDBVersionValid($errorMessage)) {
         CRM_Core_Session::setStatus($errorMessage, ts('Warning'), "alert", array('expires' => 0));
     }
     $this->assign('registerSite', htmlspecialchars('https://civicrm.org/register-your-site?src=iam&sid=' . CRM_Utils_System::getSiteID()));
     $groups = array('Customize Data and Screens' => ts('Customize Data and Screens'), 'Communications' => ts('Communications'), 'Localization' => ts('Localization'), 'Users and Permissions' => ts('Users and Permissions'), 'System Settings' => ts('System Settings'));
     $config = CRM_Core_Config::singleton();
     if (in_array('CiviContribute', $config->enableComponents)) {
         $groups['CiviContribute'] = ts('CiviContribute');
     }
     if (in_array('CiviMember', $config->enableComponents)) {
         $groups['CiviMember'] = ts('CiviMember');
     }
     if (in_array('CiviEvent', $config->enableComponents)) {
         $groups['CiviEvent'] = ts('CiviEvent');
     }
     if (in_array('CiviMail', $config->enableComponents)) {
         $groups['CiviMail'] = ts('CiviMail');
     }
     if (in_array('CiviCase', $config->enableComponents)) {
         $groups['CiviCase'] = ts('CiviCase');
     }
     if (in_array('CiviReport', $config->enableComponents)) {
         $groups['CiviReport'] = ts('CiviReport');
     }
     if (in_array('CiviCampaign', $config->enableComponents)) {
         $groups['CiviCampaign'] = ts('CiviCampaign');
     }
     $values = CRM_Core_Menu::getAdminLinks();
     $this->_showHide = new CRM_Core_ShowHideBlocks();
     foreach ($groups as $group => $title) {
         $groupId = str_replace(' ', '_', $group);
         $this->_showHide->addShow("id_{$groupId}_show");
         $this->_showHide->addHide("id_{$groupId}");
         $v = CRM_Core_ShowHideBlocks::links($this, $groupId, '', '', FALSE);
         if (isset($values[$group])) {
             $adminPanel[$groupId] = $values[$group];
             $adminPanel[$groupId]['show'] = $v['show'];
             $adminPanel[$groupId]['hide'] = $v['hide'];
             $adminPanel[$groupId]['title'] = $title;
         } else {
             $adminPanel[$groupId] = array();
             $adminPanel[$groupId]['show'] = '';
             $adminPanel[$groupId]['hide'] = '';
             $adminPanel[$groupId]['title'] = $title;
         }
     }
     $this->assign('adminPanel', $adminPanel);
     $this->_showHide->addToTemplate();
     return parent::run();
 }
開發者ID:indydas,項目名稱:civi-demo,代碼行數:64,代碼來源:Admin.php


注:本文中的CRM_Utils_System::getSiteID方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。