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


PHP CRM_Logging_Schema::fixSchemaDifferences方法代碼示例

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


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

示例1: install

 /**
  * Add records of the extension to the database -- and enable it
  *
  * @param array $keys
  *   List of extension keys.
  * @throws CRM_Extension_Exception
  */
 public function install($keys)
 {
     $origStatuses = $this->getStatuses();
     // TODO: to mitigate the risk of crashing during installation, scan
     // keys/statuses/types before doing anything
     foreach ($keys as $key) {
         list($info, $typeManager) = $this->_getInfoTypeHandler($key);
         // throws Exception
         switch ($origStatuses[$key]) {
             case self::STATUS_INSTALLED:
                 // ok, nothing to do
                 break;
             case self::STATUS_DISABLED:
                 // re-enable it
                 $typeManager->onPreEnable($info);
                 $this->_setExtensionActive($info, 1);
                 $typeManager->onPostEnable($info);
                 break;
             case self::STATUS_UNINSTALLED:
                 // install anew
                 $typeManager->onPreInstall($info);
                 $this->_createExtensionEntry($info);
                 $typeManager->onPostInstall($info);
                 break;
             case self::STATUS_UNKNOWN:
             default:
                 throw new CRM_Extension_Exception("Cannot install or enable extension: {$key}");
         }
     }
     $this->statuses = NULL;
     $this->mapper->refresh();
     CRM_Core_Invoke::rebuildMenuAndCaches(TRUE);
     $schema = new CRM_Logging_Schema();
     $schema->fixSchemaDifferences();
     foreach ($keys as $key) {
         list($info, $typeManager) = $this->_getInfoTypeHandler($key);
         // throws Exception
         switch ($origStatuses[$key]) {
             case self::STATUS_INSTALLED:
                 // ok, nothing to do
                 break;
             case self::STATUS_DISABLED:
                 // re-enable it
                 break;
             case self::STATUS_UNINSTALLED:
                 // install anew
                 $typeManager->onPostPostInstall($info);
                 break;
             case self::STATUS_UNKNOWN:
             default:
                 throw new CRM_Extension_Exception("Cannot install or enable extension: {$key}");
         }
     }
 }
開發者ID:FundingWorks,項目名稱:civicrm-core,代碼行數:61,代碼來源:Manager.php

示例2: mosaico_civicrm_uninstall

/**
 * Implements hook_civicrm_uninstall().
 *
 * @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_uninstall
 */
function mosaico_civicrm_uninstall()
{
    _mosaico_civix_civicrm_uninstall();
    $schema = new CRM_Logging_Schema();
    $schema->fixSchemaDifferences();
}
開發者ID:Kajakaran,項目名稱:uk.co.vedaconsulting.mosaico,代碼行數:11,代碼來源:mosaico.php

示例3: doFinish

 public static function doFinish()
 {
     $upgrade = new CRM_Upgrade_Form();
     list($ignore, $latestVer) = $upgrade->getUpgradeVersions();
     // Seems extraneous in context, but we'll preserve old behavior
     $upgrade->setVersion($latestVer);
     // lets rebuild the config array in case we've made a few changes in the
     // code base
     // this also helps us always store the latest version of civi in the DB
     $params = array();
     CRM_Core_BAO_ConfigSetting::add($params);
     // CRM-12804 comment-51411 : add any missing settings
     // at the end of upgrade
     CRM_Core_BAO_Setting::updateSettingsFromMetaData();
     // cleanup caches CRM-8739
     $config = CRM_Core_Config::singleton();
     $config->cleanupCaches(1);
     // Rebuild all triggers and re-enable logging if needed
     $logging = new CRM_Logging_Schema();
     $logging->fixSchemaDifferences();
     //CRM-16257 update Config.IDS.ini might be an old copy
     CRM_Core_IDS::createConfigFile(TRUE);
 }
開發者ID:nganivet,項目名稱:civicrm-core,代碼行數:23,代碼來源:Form.php

示例4: doFinish

 public static function doFinish()
 {
     $upgrade = new CRM_Upgrade_Form();
     list($ignore, $latestVer) = $upgrade->getUpgradeVersions();
     // Seems extraneous in context, but we'll preserve old behavior
     $upgrade->setVersion($latestVer);
     // Clear cached metadata.
     Civi::service('settings_manager')->flush();
     // cleanup caches CRM-8739
     $config = CRM_Core_Config::singleton();
     $config->cleanupCaches(1);
     // Rebuild all triggers and re-enable logging if needed
     $logging = new CRM_Logging_Schema();
     $logging->fixSchemaDifferences();
     //CRM-16257 update Config.IDS.ini might be an old copy
     CRM_Core_IDS::createConfigFile(TRUE);
 }
開發者ID:nielosz,項目名稱:civicrm-core,代碼行數:17,代碼來源:Form.php


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