当前位置: 首页>>代码示例>>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;未经允许,请勿转载。