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


PHP ModUtil::delVar方法代码示例

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


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

示例1: Admin_Messages_delete

/**
 * delete the Admin module
 * This function is only ever called once during the lifetime of a particular
 * module instance
 * @author Mark West
 * @return bool true if deletetion succcesful, false otherwise
 */
function Admin_Messages_delete()
{
    if (!DBUtil::dropTable('message')) {
        return false;
    }
    ModUtil::delVar('Admin_Messages');
    // Deletion successful
    return true;
}
开发者ID:robbrandt,项目名称:AdminMessages,代码行数:16,代码来源:pninit.php

示例2: uninstall

 /**
  * Uninstall the TimeIt module.
  *
  * @return boolean
  */
 function uninstall()
 {
     // drop tables
     DoctrineUtil::dropTable('TimeIt_calendars');
     DoctrineUtil::dropTable('TimeIt_events');
     DoctrineUtil::dropTable('TimeIt_date_has_events');
     DoctrineUtil::dropTable('TimeIt_regs');
     // remove all module vars
     ModUtil::delVar('TimeIt');
     return true;
 }
开发者ID:planetenkiller,项目名称:TimeIt,代码行数:16,代码来源:Installer.php

示例3: Uninstall

    /**
     * Delete the IWmenu module
     * @author Albert Pï¿œrez Monfort (aperezm@xtec.cat)
     * @return bool true if successful, false otherwise
     */
    public function Uninstall() {
        // Delete module table
        DBUtil::dropTable('IWmenu');

        //Delete module vars
        ModUtil::delVar('IWmenu', 'height');
        ModUtil::delVar('IWmenu', 'width');
        ModUtil::delVar('IWmenu', 'imagedir');

        //Deletion successfull
        return true;
    }
开发者ID:projectesIF,项目名称:Sirius,代码行数:17,代码来源:Installer.php

示例4: Uninstall

    /**
     * Delete the IWbookings module
     * @author Albert Pérez Monfort (aperezm@xtec.cat)
     * @return bool true if successful, false otherwise
     */
    function Uninstall() {
        // Delete module table
        DBUtil::dropTable('IWbookings');
        DBUtil::dropTable('IWbookings_spaces');

        //Delete module vars
        ModUtil::delVar('IWbookings', 'groups');
        ModUtil::delVar('IWbookings', 'weeks');
        ModUtil::delVar('IWbookings', 'month_panel');
        ModUtil::delVar('IWbookings', 'weekends');
        ModUtil::delVar('IWbookings', 'eraseold');
        ModUtil::delVar('IWbookings', 'showcolors');
        ModUtil::delVar('IWbookings', 'NTPtime');

        //Deletion successfull
        return true;
    }
开发者ID:projectesIF,项目名称:Sirius,代码行数:22,代码来源:Installer.php

示例5: delState

 /**
  * Delete plugin state.
  *
  * @param string $name Plugin name.
  *
  * @return boolean
  */
 public static function delState($name)
 {
     return ModUtil::delVar(self::CONFIG, $name);
 }
开发者ID:,项目名称:,代码行数:11,代码来源:

示例6: delVars

 /**
  * Convenience Module DelVar for all keys for this module.
  *
  * @return object This.
  */
 public function delVars()
 {
     ModUtil::delVar($this->name);
     return $this;
 }
开发者ID:,项目名称:,代码行数:10,代码来源:

示例7: upgrade

    /**
     * upgrade the theme module from an old version
     *
     * This function must consider all the released versions of the module!
     * If the upgrade fails at some point, it returns the last upgraded version.
     *
     * @param  string $oldVersion version number string to upgrade from
     * @return mixed  true on success, last valid version string or false if fails
     */
    public function upgrade($oldversion)
    {
        // update the table
        if (!DBUtil::changeTable('themes')) {
            return false;
        }

        switch ($oldversion) {
            case '3.1':
                $this->setVar('cssjscombine', false);
                $this->setVar('cssjscompress', false);
                $this->setVar('cssjsminify', false);
                $this->setVar('cssjscombine_lifetime', 3600);

            case '3.3':
            // convert pnRender modvars
                $pnrendervars = ModUtil::getVar('pnRender');
                foreach ($pnrendervars as $k => $v) {
                    $this->setVar('render_' . $k, $v);
                }
                // delete pnRender modvars
                ModUtil::delVar('pnRender');

                $modid = ModUtil::getIdFromName('pnRender');

                // check and update blocks
                $blocks = ModUtil::apiFunc('Blocks', 'user', 'getall', array('modid' => $modid));
                if (!empty($blocks)) {
                    $thememodid = ModUtil::getIdFromName('Theme');
                    foreach ($blocks as $block) {
                        $block->setBkey('render');
                        $block->setMid($thememodid);
                        $this->entityManager->flush();
                    }
                }

                // check and fix permissions
                $dbtable = DBUtil::getTables();
                $permscolumn = $dbtable['group_perms_column'];
                $permswhere = "WHERE $permscolumn[component] = 'pnRender:pnRenderblock:'";
                $perms = DBUtil::selectObjectArray('group_perms', $permswhere);
                if (!empty($perms)) {
                    foreach ($perms as $perm) {
                        $perm['component'] = 'Theme:Renderblock:';
                        DBUtil::updateObject($perm, 'group_perms', '', 'pid');
                    }
                }

                // Set Module pnRender 'Inactive'
                if (!ModUtil::apiFunc('Extensions', 'admin', 'setstate', array(
                'id' => $modid,
                'state' => ModUtil::STATE_INACTIVE))) {
                    return '3.3';
                }
                // Remove Module pnRender from Modulelist
                if (!ModUtil::apiFunc('Extensions', 'admin', 'remove', array(
                'id' => $modid))) {
                    return '3.3';
                }

            case '3.4':
                if (!DBUtil::changeTable('themes')) {
                    return '3.4';
                }
            case '3.4.1':
                if (!DBUtil::changeTable('themes')) {
                    return '3.4.1';
                }
                $this->setVar('enable_mobile_theme', false);
            case '3.4.2':
                // future upgrade
        }

        // Update successful
        return true;
    }
开发者ID:projectesIF,项目名称:Sirius,代码行数:85,代码来源:Installer.php

示例8: upgrade

 public function upgrade($oldversion){
     switch ($oldversion) {
         case '1.0.0':
             if (!DBUtil::createTable('cataleg_gtafEntities') ||
                 !DBUtil::createTable('cataleg_gtafGroups') ){
                 return false;
             }
         case '1.1.0':
             $gZ = ModUtil::getVar('Cataleg','grupsZikula');
             $gZ['Sirius'] = $gZ['Cataleg'];
             unset($gZ['Cataleg']);
             $gZ['ExSirius'] = $gZ['ExCataleg'];
             unset($gZ['ExCataleg']);
             $gZ['Personals'] = $gZ['Usuaris'];
             unset($gZ['Usuaris']);
             $gZ['LectorsCat'] = $gZ['Lectors'];
             unset($gZ['Lectors']);
             $gZ['EditorsCat'] = $gZ['Editors'];
             unset($gZ['Editors']);
             ModUtil::setVar('Cataleg','grupsZikula',$gZ);
             $var2 = ModUtil::getVar('Cataleg', 'usuarisCataleg');
             if (isset($var2)) ModUtil::delVar('Cataleg', 'usuarisCataleg');
             
         case '1.1.1':
             HookUtil::registerSubscriberBundles($this->version->getHookSubscriberBundles());
         case '1.1.2':
         case '1.1.3':
     }
     return true;
 }
开发者ID:projectesIF,项目名称:Sirius,代码行数:30,代码来源:Installer.php

示例9: uninstall

 public function uninstall()
 {
     ModUtil::delVar($this->serviceId);
     return true;
 }
开发者ID:pheski,项目名称:Scribite,代码行数:5,代码来源:Plugin.php

示例10: delVars

 /**
  * Convenience Module DelVar for all keys for this module.
  *
  * @return object This.
  */
 public function delVars()
 {
     ModUtil::delVar($this->getServiceId());
     return $this;
 }
开发者ID:rmaiwald,项目名称:core,代码行数:10,代码来源:Plugin.php

示例11: pnModDelVar

/**
 * The pnModDelVar function deletes a module variable.
 *
 * Delete a module variables. If the optional name parameter is not supplied all variables
 * for the module 'modname' are deleted.
 *
 * @deprecated
 * @see ModUtil::delVar()
 *
 * @param string $modname The name of the module.
 * @param string $name    The name of the variable (optional).
 *
 * @return boolean True if successful, false otherwise.
 */
function pnModDelVar($modname, $name = '')
{
    LogUtil::log(__f('Warning! Function %1$s is deprecated. Please use %2$s instead.', array(__FUNCTION__, 'ModUtil::delVar()')), E_USER_DEPRECATED);
    return ModUtil::delVar($modname, $name);
}
开发者ID:,项目名称:,代码行数:19,代码来源:

示例12: uninstall

    /**
     * Esborrar el mòdul IWbooks
     */
    public function uninstall() {
        // Delete tables
        DBUtil::dropTable('IWbooks');
        DBUtil::dropTable('IWbooks_materies');

        // Esborrar les variables del mòdul
        ModUtil::delVar('IWbooks', 'itemsperpage');
        ModUtil::delVar('IWbooks', 'fpdf');
        ModUtil::delVar('IWbooks', 'any');
        ModUtil::delVar('IWbooks', 'encap');
        ModUtil::delVar('IWbooks', 'plans');
        ModUtil::delVar('IWbooks', 'darrer_nivell');
        ModUtil::delVar('IWbooks', 'nivells');
        ModUtil::delVar('IWbooks', 'llistar_materials');
        ModUtil::delVar('IWbooks', 'mida_font');
        ModUtil::delVar('IWbooks', 'marca_aigua');
        // Acció d'esborrar acabada amb èxit
        return true;
    }
开发者ID:projectesIF,项目名称:Sirius,代码行数:22,代码来源:Installer.php

示例13: uninstall

    /**
     * Delete the IWjclic module
     * @author Albert Pérez Monfort (aperezm@xtec.cat)
     * @return bool true if successful, false otherwise
     */
    public function uninstall() {
        // Delete module table
        DBUtil::dropTable('IWjclic');
        DBUtil::dropTable('IWjclic_activities');
        DBUtil::dropTable('IWjclic_groups');
        DBUtil::dropTable('IWjclic_sessions');
        DBUtil::dropTable('IWjclic_users');
        DBUtil::dropTable('IWjclic_settings');

        //Delete module vars
        ModUtil::delVar('IWjclic', 'timeLap');
        ModUtil::delVar('IWjclic', 'jclicJarBase');
        ModUtil::delVar('IWjclic', 'jclicUpdatedFiles');
        ModUtil::delVar('IWjclic', 'groupsProAssign');

        //Deletion successfull
        return true;
    }
开发者ID:projectesIF,项目名称:Sirius,代码行数:23,代码来源:Installer.php

示例14: _addressbook_upgradeto_1_3

 /**
  * upgrade to 1.3
  *
  */
 function _addressbook_upgradeto_1_3()
 {
     $oldvars = ModUtil::getVar('Addressbook');
     foreach ($oldvars as $varname => $oldvar) {
         ModUtil::delVar('AddressBook', $varname, $oldvar);
     }
     ModUtil::setVars('AddressBook', $oldvars);
     return true;
 }
开发者ID:nmpetkov,项目名称:AddressBook,代码行数:13,代码来源:Installer.php

示例15: delVar

 /**
  * Delete a configuration variable.
  *
  * @param string $name The name of the variable.
  *
  * @return mixed Value of deleted config var or false on failure.
  */
 public static function delVar($name)
 {
     if (!isset($name)) {
         return false;
     }
     // The database parameter are not allowed to be deleted
     if (empty($name) || $name == 'dbtype' || $name == 'dbhost' || $name == 'dbuname' || $name == 'dbpass' || $name == 'dbname' || $name == 'system' || $name == 'prefix' || $name == 'encoded') {
         return false;
     }
     // Delete the variable
     ModUtil::delVar(ModUtil::CONFIG_MODULE, $name);
     // Update my vars
     $val = false;
     if (array_key_exists($name, $GLOBALS['ZConfig']['System'])) {
         $val = $GLOBALS['ZConfig']['System'][$name];
         unset($GLOBALS['ZConfig']['System'][$name]);
     }
     // success
     return $val;
 }
开发者ID:planetenkiller,项目名称:core,代码行数:27,代码来源:System.php


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