當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。