예제 #1
0
 /**
  * Delete this instance
  */
 function delete()
 {
     if ($this->isentitytype) {
         Vtiger_Access::deleteSharing($this);
         Vtiger_Access::deleteTools($this);
         Vtiger_Filter::deleteForModule($this);
         Vtiger_Block::deleteForModule($this);
         if (method_exists($this, 'deinitWebservice')) {
             $this->deinitWebservice();
         }
     }
     $this->__delete();
     Vtiger_Profile::deleteForModule($this);
     Vtiger_Link::deleteAll($this->id);
     Vtiger_Menu::detachModule($this);
     self::syncfile();
 }
예제 #2
0
danzi.tn@20150427 template per la creazione di un modulo
                  da utilizzare dopo aver creato il modulo con la console
**/
chdir(dirname(__FILE__) . '/../..');
include_once 'vtlib/Vtiger/Module.php';
include_once 'vtlib/Vtiger/Package.php';
include_once 'includes/main/WebUI.php';
include_once 'include/Webservices/Utils.php';
$Vtiger_Utils_Log = true;
$SINGLE_MODULENAME = 'Rumor';
$MODULENAME = $SINGLE_MODULENAME . 's';
$moduleInstance = Vtiger_Module::getInstance($MODULENAME);
if ($moduleInstance || file_exists('modules/' . $MODULENAME)) {
    $tabid = $moduleInstance->id;
    echo "\nModule " . $MODULENAME . " is present\n";
    Vtiger_Filter::deleteForModule($moduleInstance);
    // Create default custom filter (mandatory)
    $filterAll = new Vtiger_Filter();
    $filterAll->name = 'All';
    $filterAll->isdefault = true;
    $moduleInstance->addFilter($filterAll);
    $fieldName = "name";
    $field = Vtiger_Field::getInstance($fieldName, $moduleInstance);
    if ($field) {
        $filterAll->addField($field);
    } else {
        echo "\nField " . $fieldName . " does not exists\n";
    }
    $block_name = 'LBL_' . strtoupper($moduleInstance->name) . '_INFORMATION';
    $block = Vtiger_Block::getInstance($block_name, $moduleInstance);
    if ($block) {
예제 #3
0
 /**
  * Delete this instance
  */
 function delete()
 {
     if ($this->isentitytype) {
         Vtiger_Access::deleteSharing($this);
         Vtiger_Access::deleteTools($this);
         Vtiger_Filter::deleteForModule($this);
         Vtiger_Block::deleteForModule($this);
     }
     $this->__delete();
     Vtiger_Profile::deleteForModule($this);
     Vtiger_Link::deleteAll($this->id);
     Vtiger_Menu::detachModule($this);
     self::syncfile();
 }
예제 #4
-1
 /**
  * Delete this instance
  */
 function delete()
 {
     $moduleInstance = Vtiger_Module_Model::getInstance($this->name);
     require_once "modules/{$this->name}/{$this->name}.php";
     $focus = new $this->name();
     $this->tableName = $focus->table_name;
     if ($this->isentitytype) {
         $this->deleteFromCRMEntity();
         Vtiger_Access::deleteTools($this);
         Vtiger_Filter::deleteForModule($this);
         Vtiger_Block::deleteForModule($this);
         if (method_exists($this, 'deinitWebservice')) {
             $this->deinitWebservice();
         }
     }
     $this->deleteIcons();
     $this->unsetAllRelatedList($moduleInstance);
     ModComments_Module_Model::deleteForModule($moduleInstance);
     Vtiger_Language::deleteForModule($moduleInstance);
     Vtiger_Access::deleteSharing($moduleInstance);
     $this->deleteFromModentityNum();
     Vtiger_Cron::deleteForModule($moduleInstance);
     Vtiger_Profile::deleteForModule($moduleInstance);
     Settings_Workflows_Module_Model::deleteForModule($moduleInstance);
     Vtiger_Menu::deleteForModule($moduleInstance);
     $this->deleteGroup2Modules();
     $this->deleteModuleTables();
     $this->deleteCRMEntityRel();
     Vtiger_Profile::deleteForModule($this);
     Vtiger_Link::deleteAll($this->id);
     $this->deleteDir($moduleInstance);
     $this->__delete();
     self::syncfile();
 }