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


PHP Vtiger_Module::fireEvent方法代码示例

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


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

示例1: import_Module

 /**
  * Import Module
  * @access private
  */
 function import_Module()
 {
     $tabname = $this->_modulexml->name;
     $tablabel = $this->_modulexml->label;
     $tabversion = $this->_modulexml->version;
     $isextension = false;
     if (!empty($this->_modulexml->type)) {
         $type = strtolower($this->_modulexml->type);
         if ($type == 'extension' || $type == 'language') {
             $isextension = true;
         }
     }
     $vtigerMinVersion = $this->_modulexml->dependencies->vtiger_version;
     $vtigerMaxVersion = $this->_modulexml->dependencies->vtiger_max_version;
     $moduleInstance = new Vtiger_Module();
     $moduleInstance->name = $tabname;
     $moduleInstance->label = $tablabel;
     $moduleInstance->isentitytype = $isextension != true;
     $moduleInstance->version = !$tabversion ? 0 : $tabversion;
     $moduleInstance->minversion = !$vtigerMinVersion ? false : $vtigerMinVersion;
     $moduleInstance->maxversion = !$vtigerMaxVersion ? false : $vtigerMaxVersion;
     if ($type != 'update') {
         $moduleInstance->save();
         $moduleInstance->initWebservice();
         $this->import_Tables($this->_modulexml);
         $this->import_Blocks($this->_modulexml, $moduleInstance);
         $this->import_CustomViews($this->_modulexml, $moduleInstance);
         $this->import_SharingAccess($this->_modulexml, $moduleInstance);
         $this->import_Events($this->_modulexml, $moduleInstance);
         $this->import_Actions($this->_modulexml, $moduleInstance);
         $this->import_RelatedLists($this->_modulexml, $moduleInstance);
         $this->import_CustomLinks($this->_modulexml, $moduleInstance);
         $this->import_CronTasks($this->_modulexml);
         Vtiger_Module::fireEvent($moduleInstance->name, Vtiger_Module::EVENT_MODULE_POSTINSTALL);
     } else {
         $this->import_update($this->_modulexml);
     }
 }
开发者ID:rcrrich,项目名称:UpdatePackages,代码行数:42,代码来源:PackageImport.php

示例2: update_Module

 /**
  * Update Module
  * @access private
  */
 function update_Module($moduleInstance)
 {
     $tabname = $this->_modulexml->name;
     $tablabel = $this->_modulexml->label;
     $parenttab = $this->_modulexml->parent;
     $tabversion = $this->_modulexml->version;
     $isextension = false;
     if (!empty($this->_modulexml->type)) {
         $type = strtolower($this->_modulexml->type);
         if ($type == 'extension' || $type == 'language') {
             $isextension = true;
         }
     }
     Vtiger_Module::fireEvent($moduleInstance->name, Vtiger_Module::EVENT_MODULE_PREUPDATE);
     // TODO Handle module property changes like menu, label etc...
     /*if(!empty($parenttab) && $parenttab != '') {
     			$menuInstance = Vtiger_Menu::getInstance($parenttab);
     			$menuInstance->addModule($moduleInstance);
     		}*/
     $this->handle_Migration($this->_modulexml, $moduleInstance);
     $this->update_Tables($this->_modulexml);
     $this->update_Blocks($this->_modulexml, $moduleInstance);
     $this->update_CustomViews($this->_modulexml, $moduleInstance);
     $this->update_SharingAccess($this->_modulexml, $moduleInstance);
     $this->update_Events($this->_modulexml, $moduleInstance);
     $this->update_Actions($this->_modulexml, $moduleInstance);
     $this->update_RelatedLists($this->_modulexml, $moduleInstance);
     $this->update_CustomLinks($this->_modulexml, $moduleInstance);
     $this->update_CronTasks($this->_modulexml);
     $moduleInstance->__updateVersion($tabversion);
     Vtiger_Module::fireEvent($moduleInstance->name, Vtiger_Module::EVENT_MODULE_POSTUPDATE);
 }
开发者ID:cannking,项目名称:vtigercrm-debug,代码行数:36,代码来源:PackageUpdate.php

示例3: __delete

 /**
  * Delete this instance
  * @access private
  */
 function __delete()
 {
     Vtiger_Module::fireEvent($this->name, Vtiger_Module::EVENT_MODULE_PREUNINSTALL);
     global $adb;
     if ($this->isentitytype) {
         $this->unsetEntityIdentifier();
         $this->deleteRelatedLists();
     }
     $adb->pquery("DELETE FROM vtiger_tab WHERE tabid=?", array($this->id));
     self::log("Deleting Module {$this->name} ... DONE");
 }
开发者ID:cin-system,项目名称:cinrepo,代码行数:15,代码来源:ModuleBasic.php

示例4: update_Module

 /**
  * Update Module
  * @access private
  */
 function update_Module($moduleInstance)
 {
     $tabname = $this->_modulexml->name;
     $tablabel = $this->_modulexml->label;
     $tabversion = $this->_modulexml->version;
     $isextension = false;
     if (!empty($this->_modulexml->type)) {
         $type = strtolower($this->_modulexml->type);
         if ($type == 'extension' || $type == 'language') {
             $isextension = true;
         }
     }
     Vtiger_Module::fireEvent($moduleInstance->name, Vtiger_Module::EVENT_MODULE_PREUPDATE);
     $moduleInstance->label = $tablabel;
     $moduleInstance->save();
     $this->handle_Migration($this->_modulexml, $moduleInstance);
     $this->update_Tables($this->_modulexml);
     $this->update_Blocks($this->_modulexml, $moduleInstance);
     $this->update_CustomViews($this->_modulexml, $moduleInstance);
     $this->update_SharingAccess($this->_modulexml, $moduleInstance);
     $this->update_Events($this->_modulexml, $moduleInstance);
     $this->update_Actions($this->_modulexml, $moduleInstance);
     $this->update_RelatedLists($this->_modulexml, $moduleInstance);
     $this->update_CustomLinks($this->_modulexml, $moduleInstance);
     $this->update_CronTasks($this->_modulexml);
     $moduleInstance->__updateVersion($tabversion);
     Vtiger_Module::fireEvent($moduleInstance->name, Vtiger_Module::EVENT_MODULE_POSTUPDATE);
 }
开发者ID:rcrrich,项目名称:UpdatePackages,代码行数:32,代码来源:PackageUpdate.php

示例5: vtlib_toggleModuleAccess

/**
 * Toggle the module (enable/disable)
 */
function vtlib_toggleModuleAccess($module, $enable_disable)
{
    global $adb, $__cache_module_activeinfo;
    include_once 'vtlib/Vtiger/Module.php';
    $event_type = false;
    if ($enable_disable === true) {
        $enable_disable = 0;
        $event_type = Vtiger_Module::EVENT_MODULE_ENABLED;
    } else {
        if ($enable_disable === false) {
            $enable_disable = 1;
            $event_type = Vtiger_Module::EVENT_MODULE_DISABLED;
        }
    }
    $adb->pquery("UPDATE vtiger_tab set presence = ? WHERE name = ?", array($enable_disable, $module));
    $__cache_module_activeinfo[$module] = $enable_disable;
    create_tab_data_file();
    create_parenttab_data_file();
    // UserPrivilege file needs to be regenerated if module state is changed from
    // vtiger 5.1.0 onwards
    global $vtiger_current_version;
    if (version_compare($vtiger_current_version, '5.0.4', '>')) {
        vtlib_RecreateUserPrivilegeFiles();
    }
    Vtiger_Module::fireEvent($module, $event_type);
}
开发者ID:sacredwebsite,项目名称:vtigercrm,代码行数:29,代码来源:VtlibUtils.php

示例6: vtlib_toggleModuleAccess

/**
 * Toggle the module (enable/disable)
 */
function vtlib_toggleModuleAccess($module, $enable_disable)
{
    global $adb, $__cache_module_activeinfo;
    include_once 'vtlib/Vtiger/Module.php';
    $event_type = false;
    if ($enable_disable === true) {
        $enable_disable = 0;
        $event_type = Vtiger_Module::EVENT_MODULE_ENABLED;
    } else {
        if ($enable_disable === false) {
            $enable_disable = 1;
            $event_type = Vtiger_Module::EVENT_MODULE_DISABLED;
        }
    }
    $adb->pquery("UPDATE vtiger_tab set presence = ? WHERE name = ?", array($enable_disable, $module));
    $__cache_module_activeinfo[$module] = $enable_disable;
    create_tab_data_file();
    vtlib_RecreateUserPrivilegeFiles();
    Vtiger_Module::fireEvent($module, $event_type);
}
开发者ID:ssstorm,项目名称:YetiForceCRM,代码行数:23,代码来源:VtlibUtils.php

示例7: __delete

 /**
  * Delete this instance
  * @access private
  */
 function __delete()
 {
     Vtiger_Module::fireEvent($this->name, Vtiger_Module::EVENT_MODULE_PREUNINSTALL);
     $adb = PearDatabase::getInstance();
     if ($this->isentitytype) {
         $this->unsetEntityIdentifier();
     }
     $adb->pquery("DELETE FROM vtiger_tab WHERE tabid=?", array($this->id));
     self::log("Deleting Module {$this->name} ... DONE");
 }
开发者ID:nikdejan,项目名称:YetiForceCRM,代码行数:14,代码来源:ModuleBasic.php

示例8: import_Module

 /**
  * Import Module
  * @access private
  */
 function import_Module()
 {
     $tabname = $this->_modulexml->name;
     $tablabel = $this->_modulexml->label;
     $parenttab = (string) $this->_modulexml->parent;
     $tabversion = $this->_modulexml->version;
     $isextension = false;
     if (!empty($this->_modulexml->type)) {
         $type = strtolower($this->_modulexml->type);
         if ($type == 'extension' || $type == 'language') {
             $isextension = true;
         }
     }
     $vtigerMinVersion = $this->_modulexml->dependencies->vtiger_version;
     $vtigerMaxVersion = $this->_modulexml->dependencies->vtiger_max_version;
     $moduleInstance = new Vtiger_Module();
     $moduleInstance->name = $tabname;
     $moduleInstance->label = $tablabel;
     if ($menuInstance = Vtiger_Menu::getInstance($parenttab)) {
         $moduleInstance->parent = $parenttab;
     } else {
         $moduleInstance->parent = "Tools";
     }
     $moduleInstance->isentitytype = $isextension != true;
     $moduleInstance->version = !$tabversion ? 0 : $tabversion;
     $moduleInstance->minversion = !$vtigerMinVersion ? false : $vtigerMinVersion;
     $moduleInstance->maxversion = !$vtigerMaxVersion ? false : $vtigerMaxVersion;
     $moduleInstance->save();
     if (!empty($parenttab)) {
         $menuInstance = Vtiger_Menu::getInstance($parenttab);
         if ($menuInstance == NULL) {
             $menuInstance = Vtiger_Menu::getInstance("Tools");
             self::log("Module attached to Tools because {$parenttab} does not exist");
         }
         $menuInstance->addModule($moduleInstance);
     }
     $this->import_Tables($this->_modulexml);
     $this->import_Blocks($this->_modulexml, $moduleInstance);
     $this->import_CustomViews($this->_modulexml, $moduleInstance);
     $this->import_SharingAccess($this->_modulexml, $moduleInstance);
     $this->import_Events($this->_modulexml, $moduleInstance);
     $this->import_Actions($this->_modulexml, $moduleInstance);
     $this->import_RelatedLists($this->_modulexml, $moduleInstance);
     $this->import_CustomLinks($this->_modulexml, $moduleInstance);
     $this->import_CronTasks($this->_modulexml);
     $moduleInstance->initWebservice();
     Vtiger_Module::fireEvent($moduleInstance->name, Vtiger_Module::EVENT_MODULE_POSTINSTALL);
 }
开发者ID:kduqi,项目名称:corebos,代码行数:52,代码来源:PackageImport.php

示例9: __delete

 /**
  * Delete this instance
  * @access private
  */
 function __delete()
 {
     Vtiger_Module::fireEvent($this->name, Vtiger_Module::EVENT_MODULE_PREUNINSTALL);
     global $adb;
     if ($this->isentitytype) {
         $this->unsetEntityIdentifier();
         $this->deleteRelatedLists();
     }
     $adb->pquery("DELETE FROM vtiger_tab WHERE tabid=?", array($this->id));
     // SalesPlatform.ru begin Disable history for deleted module
     $adb->pquery("DELETE FROM vtiger_modtracker_tabs WHERE tabid=?", array($this->id));
     // SalesPlatform.ru end
     self::log("Deleting Module {$this->name} ... DONE");
 }
开发者ID:gitter-badger,项目名称:openshift-salesplatform,代码行数:18,代码来源:ModuleBasic.php

示例10: import_Module

 /**
  * Import Module
  * @access private
  */
 function import_Module()
 {
     $tabname = $this->_modulexml->name;
     $tablabel = $this->_modulexml->label;
     $parenttab = (string) $this->_modulexml->parent;
     $tabversion = $this->_modulexml->version;
     $isextension = false;
     if (!empty($this->_modulexml->type)) {
         $type = strtolower($this->_modulexml->type);
         if ($type == 'extension' || $type == 'language') {
             $isextension = true;
         }
     }
     $moduleInstance = new Vtiger_Module();
     $moduleInstance->name = $tabname;
     $moduleInstance->label = $tablabel;
     $moduleInstance->isentitytype = $isextension != true;
     $moduleInstance->version = !$tabversion ? 0 : $tabversion;
     $moduleInstance->save();
     if (!empty($parenttab)) {
         $menuInstance = Vtiger_Menu::getInstance($parenttab);
         $menuInstance->addModule($moduleInstance);
     }
     $this->import_Tables($this->_modulexml);
     $this->import_Blocks($this->_modulexml, $moduleInstance);
     $this->import_CustomViews($this->_modulexml, $moduleInstance);
     $this->import_SharingAccess($this->_modulexml, $moduleInstance);
     $this->import_Events($this->_modulexml, $moduleInstance);
     $this->import_Actions($this->_modulexml, $moduleInstance);
     $this->import_RelatedLists($this->_modulexml, $moduleInstance);
     $this->import_CustomLinks($this->_modulexml, $moduleInstance);
     Vtiger_Module::fireEvent($moduleInstance->name, Vtiger_Module::EVENT_MODULE_POSTINSTALL);
     $moduleInstance->initWebservice();
 }
开发者ID:vtiger-jp,项目名称:vtigercrm-5.1.x-ja,代码行数:38,代码来源:PackageImport.php


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