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


PHP Module::disableByName方法代码示例

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


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

示例1: desactivate_custom_modules

function desactivate_custom_modules()
{
    $arrNonNative = Module::getNonNativeModuleList();
    $uninstallMe = array("undefined-modules");
    if (is_array($arrNonNative)) {
        foreach ($arrNonNative as $aModule) {
            $uninstallMe[] = $aModule['name'];
        }
    }
    return Module::disableByName($uninstallMe);
}
开发者ID:priyankajsr19,项目名称:indusdiva2,代码行数:11,代码来源:desactivatecustommodules.php

示例2: upgrade_module_1_1_0

function upgrade_module_1_1_0($module)
{
    $old_module = 'zzcleanurls';
    if (Module::isInstalled($old_module)) {
        Module::disableByName($this->name);
        die(Tools::displayError('You must first un-install module "ZiZuu Clean URLs"'));
    }
    Db::getInstance()->delete('module', "`name` = '{$old_module}'", 1);
    Db::getInstance()->delete('module_preference', "`module` = '{$old_module}'");
    Db::getInstance()->delete('configuration', "`name` LIKE '{$old_module}%'");
    Db::getInstance()->delete('quick_access', "`link` LIKE '%module_name={$old_module}%'");
    return true;
}
开发者ID:zizuu-store,项目名称:zzcleanurls,代码行数:13,代码来源:install-1.1.0.php

示例3: install

 /**
  * Don't forget to create update methods if needed:
  * http://doc.prestashop.com/display/PS16/Enabling+the+Auto-Update
  */
 public function install()
 {
     //instalacion del modulo
     if (Module::isInstalled('botondepago')) {
         Module::disableByName($this->name);
         //note during testing if this is not done, your module will show as installed in modules
         die(Tools::displayError('Primero debe desinstalar la version anterior del modulo.'));
     }
     $this->createConfigVariables();
     include dirname(__FILE__) . '/sql/install.php';
     //script sql con la creacion de la tabla transaction
     return parent::install() && $this->registerHook('displayPayment') && $this->registerHook('displayPaymentReturn') && $this->registerHook('displayBackOfficeHeader') && $this->registerHook('displayHeader') && $this->registerHook('displayAdminProductsExtra') && $this->registerHook('actionProductUpdate') && $this->registerHook('displayAdminOrderContentOrder') && $this->registerHook('displayAdminOrderTabOrder') && $this->unregisterHook('displayAdminProductsExtra');
     //muestra una tab en el detalle de la orden
 }
开发者ID:TodoPago,项目名称:Plugin-PrestaShop,代码行数:18,代码来源:todopago.php

示例4: desactivate_custom_modules

function desactivate_custom_modules()
{
    // Get all modules then select only payment ones
    $arrInstalledModules = Module::getModulesInstalled();
    // get native module list
    $module_list_xml = INSTALL_PATH . '/../config/modules_list.xml';
    $nativeModules = simplexml_load_file($module_list_xml);
    $nativeModules = $nativeModules->modules;
    if ($nativeModules['type'] == 'native') {
        foreach ($nativeModules->module as $module) {
            $arrNativeModules[] = $module['name'] . '';
        }
    }
    $uninstallMe = array("rien");
    foreach ($arrInstalledModules as $aModule) {
        if (!in_array($aModule['name'], $arrNativeModules)) {
            $uninstallMe[] = $aModule['name'];
        }
    }
    Module::disableByName($uninstallMe);
    foreach ($aModule as $module) {
        $file = _PS_MODULE_DIR_ . $module['name'] . '/' . $module['name'] . '.php';
        if (!file_exists($file)) {
            continue;
        }
        $fd = fopen($file, 'r');
        if (!$fd) {
            continue;
        }
        $content = fread($fd, filesize($file));
        if (preg_match_all('/extends PaymentModule/U', $content, $matches)) {
            Db::getInstance()->Execute('
			INSERT INTO `' . _DB_PREFIX_ . 'module_country` (id_module, id_country)
			SELECT ' . (int) $module['id_module'] . ', id_country FROM `' . _DB_PREFIX_ . 'country` WHERE active = 1');
            Db::getInstance()->Execute('
			INSERT INTO `' . _DB_PREFIX_ . 'module_currency` (id_module, id_currency)
			SELECT ' . (int) $module['id_module'] . ', id_currency FROM `' . _DB_PREFIX_ . 'currency` WHERE deleted = 0');
        }
        fclose($fd);
    }
}
开发者ID:hecbuma,项目名称:quali-fisioterapia,代码行数:41,代码来源:desactivatecustommodules.php

示例5: disable

 /**
  * Called when module is set to deactive
  */
 public function disable()
 {
     return Module::disableByName($this->name);
 }
开发者ID:nicolasjeol,项目名称:hec-ecommerce,代码行数:7,代码来源:Module.php

示例6: removeBlocknewsletterBlock

 /**
  * Remove the default newsletter block so that we can accomodate the
  * newsletter block of SendinBlue
  */
 public function removeBlocknewsletterBlock()
 {
     if (_PS_VERSION_ <= '1.4.1.0') {
         Db::getInstance()->Execute('UPDATE `' . _DB_PREFIX_ . 'module` SET active = 0 WHERE name = "blocknewsletter"');
     } else {
         Module::disableByName('blocknewsletter');
     }
 }
开发者ID:ventsiwad,项目名称:presta_addons,代码行数:12,代码来源:sendinblue.php

示例7: setPosition

 protected function setPosition()
 {
     $position = 0;
     $blocksearch = Module::getInstanceByName('blocksearch');
     /**
      * If 'blocksearch' is not installed the module requires
      * A manual position update
      */
     if ($blocksearch !== false) {
         $hook_top = Hook::getIdByName('displayTop');
         $position = $blocksearch->getPosition($hook_top);
         if (is_null($position) == false) {
             /* Disable the default 'blocksearch' module */
             Module::disableByName('blocksearch');
             $this->updatePosition($hook_top, 0, $position);
         }
     }
     /* Register configuration key so we know the position has been updated */
     Configuration::updateValue('ALGOLIA_POSITION_FIXED', $position);
 }
开发者ID:matiasmenker,项目名称:algoliasearch-prestashop,代码行数:20,代码来源:algolia.php

示例8: disableOtherSearch

 public function disableOtherSearch()
 {
     if (Module::isEnabled('blocksearch')) {
         Module::disableByName('blocksearch');
     }
     if (Module::isEnabled('searchsuggestions')) {
         Module::disableByName('searchsuggestions');
     }
     if (Module::isEnabled('powersearch')) {
         Module::disableByName('powersearch');
     }
     return true;
 }
开发者ID:Deparagon,项目名称:Instant-Search-Suggestion-Module,代码行数:13,代码来源:tomcategorysearch.php


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