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


PHP ModuleInstaller::uninstallExtLabels方法代码示例

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


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

示例1: testUninstallExtLabels

 /**
  * @group 56228
  */
 public function testUninstallExtLabels()
 {
     $files = array('custom/Extension/modules/Bugs/Ext/Language/en_us.customopportunities_bugs_1.php' => 'some text', 'custom/Extension/modules/Opportunities/Ext/Language/en_us.customopportunities_bugs_1.php' => 'some text', 'custom/Extension/application/Ext/Language/en_us.customopportunities_bugs_1.php' => 'some text');
     $labelDefinitions = array(array('module' => 'Bugs'), array('module' => 'Opportunities'), array('module' => 'application'));
     $this->writeTestFiles($files);
     $oModuleInstaller = new ModuleInstaller();
     $oModuleInstaller->id_name = 'customopportunities_bugs_1';
     $oModuleInstaller->uninstallExtLabels($labelDefinitions);
     foreach (array_keys($files) as $fileName) {
         $this->assertFileNotExists($fileName);
     }
 }
开发者ID:delkyd,项目名称:sugarcrm_dev,代码行数:15,代码来源:Bug56228Test.php

示例2: delete

 function delete($rel_name)
 {
     //Remove any fields from layouts
     $rel = $this->get($rel_name);
     if (!empty($rel)) {
         $this->removeFieldsFromDeployedLayout($rel);
     }
     require_once "ModuleInstall/ModuleInstaller.php";
     require_once 'modules/Administration/QuickRepairAndRebuild.php';
     $mi = new ModuleInstaller();
     $mi->silent = true;
     $mi->id_name = 'custom' . $rel_name;
     // provide the moduleinstaller with a unique name for this relationship - normally this value is set to the package key...
     $mi->uninstall_relationship("custom/metadata/{$rel_name}MetaData.php");
     $mi->uninstallLabels('custom/Extension/modules/relationships/language/', $rel->buildLabels());
     $mi->uninstallExtLabels($rel->buildLabels());
     // now clear all caches so that our changes are visible
     Relationship::delete_cache();
     $mi->rebuild_tabledictionary();
     $MBmodStrings = $GLOBALS['mod_strings'];
     $GLOBALS['mod_strings'] = return_module_language('', 'Administration');
     $rac = new RepairAndClear();
     $rac->repairAndClearAll(array('clearAll', 'rebuildExtensions'), array($GLOBALS['mod_strings']['LBL_ALL_MODULES']), true, false);
     $GLOBALS['mod_strings'] = $MBmodStrings;
     //Bug 41070, supercedes the previous 40941 fix in this section
     if (isset($this->relationships[$rel_name])) {
         unset($this->relationships[$rel_name]);
     }
 }
开发者ID:delkyd,项目名称:sugarcrm_dev,代码行数:29,代码来源:DeployedRelationships.php


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