• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Vtiger_Field类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: applyChange

 function applyChange()
 {
     global $adb;
     if ($this->hasError()) {
         $this->sendError();
     }
     if ($this->isApplied()) {
         $this->sendMsg('Changeset ' . get_class($this) . ' already applied!');
     } else {
         global $adb;
         $moduleInstance = Vtiger_Module::getInstance('Users');
         $block = Vtiger_Block::getInstance('LBL_CALENDAR_SETTINGS', $moduleInstance);
         if (!$block) {
             $block = new Vtiger_Block();
             $block->label = 'LBL_CALENDAR_SETTINGS';
             $block->sequence = 2;
             $moduleInstance->addBlock($block);
         }
         $this->ExecuteQuery("delete from vtiger_picklist where name='hour_format'");
         $this->ExecuteQuery("delete from vtiger_picklist where name='start_hour'");
         $field = Vtiger_Field::getInstance('hour_format', $moduleInstance);
         $this->ExecuteQuery('update vtiger_field set presence=2,uitype=16 where fieldid=' . $field->id);
         $field->setPicklistValues(array('am/pm', '12', '24'));
         $start_hour = Vtiger_Field::getInstance('start_hour', $moduleInstance);
         $this->ExecuteQuery('update vtiger_field set presence=2,uitype=16 where fieldid=' . $start_hour->id);
         $this->sendMsg('Changeset ' . get_class($this) . ' applied!');
         $this->markApplied();
     }
     $this->finishExecution();
 }
开发者ID:casati-dolibarr,项目名称:corebos,代码行数:30,代码来源:UserHourStartFieldsPL16.php


示例2: applyChange

 function applyChange()
 {
     if ($this->hasError()) {
         $this->sendError();
     }
     if ($this->isApplied()) {
         $this->sendMsg('Changeset ' . get_class($this) . ' already applied!');
     } else {
         global $adb;
         $moduleInstance = Vtiger_Module::getInstance('GlobalVariable');
         // change uitype and label
         $field = Vtiger_Field::getInstance('module_list', $moduleInstance);
         if ($field) {
             $this->ExecuteQuery("update vtiger_field set uitype=3313,fieldlabel='Module List' where fieldid=" . $field->id);
         }
         // convert all existing records to new format
         $gvrs = $adb->pquery('select globalvariableid,module_list from vtiger_globalvariable', array());
         $updsql = 'update vtiger_globalvariable set module_list=? where globalvariableid=?';
         while ($gv = $adb->fetch_array($gvrs)) {
             if (trim($gv['module_list']) != '') {
                 $ml = array_map('trim', explode(',', $gv['module_list']));
                 $ml = implode(' |##| ', $ml);
                 $this->ExecuteQuery($updsql, array($ml, $gv['globalvariableid']));
             }
         }
         // fix incorrect entiyidentifier
         $updsql = "UPDATE `vtiger_entityname` SET \n\t\t\t\t`fieldname`='globalno',\n\t\t\t\t`entityidfield`='globalvariableid',\n\t\t\t\t`entityidcolumn`='globalvariableid'\n\t\t\t\tWHERE `modulename`='GlobalVariable' and `tablename`='vtiger_globalvariable'";
         $this->sendMsg('Changeset ' . get_class($this) . ' applied!');
         $this->markApplied();
     }
     $this->finishExecution();
 }
开发者ID:casati-dolibarr,项目名称:corebos,代码行数:32,代码来源:GlobalVarUITypeModuleListFixEntityID.php


示例3: applyChange

 function applyChange()
 {
     global $adb;
     if ($this->hasError()) {
         $this->sendError();
     }
     if ($this->isApplied()) {
         $this->sendMsg('Changeset ' . get_class($this) . ' already applied!');
     } else {
         global $adb;
         $modname = 'SalesOrder';
         $module = Vtiger_Module::getInstance($modname);
         $field = Vtiger_Field::getInstance('recurring_frequency', $module);
         if ($field) {
             $field->setPicklistValues(array('2years', '3years', '4years', '5years'));
             $this->ExecuteQuery("UPDATE vtiger_recurring_frequency SET sortorderid=7 WHERE recurring_frequency='2years'");
             $this->ExecuteQuery("UPDATE vtiger_recurring_frequency SET sortorderid=8 WHERE recurring_frequency='3years'");
             $this->ExecuteQuery("UPDATE vtiger_recurring_frequency SET sortorderid=9 WHERE recurring_frequency='4years'");
             $this->ExecuteQuery("UPDATE vtiger_recurring_frequency SET sortorderid=10 WHERE recurring_frequency='5years'");
         }
         $this->sendMsg('Changeset ' . get_class($this) . ' applied!');
         $this->markApplied();
     }
     $this->finishExecution();
 }
开发者ID:kduqi,项目名称:corebos,代码行数:25,代码来源:addRecurringSO.php


示例4: applyChange

 function applyChange()
 {
     global $adb;
     if ($this->hasError()) {
         $this->sendError();
     }
     if ($this->isApplied()) {
         $this->sendMsg('Changeset ' . get_class($this) . ' already applied!');
     } else {
         $moduleInstance = Vtiger_Module::getInstance('Users');
         $block = Vtiger_Block::getInstance('LBL_USER_ADV_OPTIONS', $moduleInstance);
         $field = Vtiger_Field::getInstance('failed_login_attempts', $moduleInstance);
         if ($field) {
             $this->ExecuteQuery('update vtiger_field set presence=2 where fieldid=' . $field->id);
         } else {
             $user_field = new Vtiger_Field();
             $user_field->name = 'failed_login_attempts';
             $user_field->label = 'LBL_FAILED_LOGIN_ATTEMPTS';
             $user_field->table = 'vtiger_users';
             $user_field->column = 'failed_login_attempts';
             $user_field->columntype = 'int(11)';
             $user_field->typeofdata = 'I~O';
             $user_field->uitype = '7';
             $user_field->masseditable = '0';
             $block->addField($user_field);
             $this->ExecuteQuery('update vtiger_users set failed_login_attempts=0');
             RecalculateSharingRules();
         }
         $this->sendMsg('Changeset ' . get_class($this) . ' applied!');
         $this->markApplied();
     }
     $this->finishExecution();
 }
开发者ID:kduqi,项目名称:corebos,代码行数:33,代码来源:UserFailedLoginAttempts.php


示例5: applyChange

 function applyChange()
 {
     global $adb;
     if ($this->hasError()) {
         $this->sendError();
     }
     if ($this->isApplied()) {
         $this->sendMsg('Changeset ' . get_class($this) . ' already applied!');
     } else {
         $moduleInstance = Vtiger_Module::getInstance('Products');
         $field = Vtiger_Field::getInstance('discontinued', $moduleInstance);
         if ($field) {
             $this->ExecuteQuery("update vtiger_field set defaultvalue='1' where fieldid=" . $field->id);
         }
         $moduleInstance = Vtiger_Module::getInstance('Services');
         $field = Vtiger_Field::getInstance('discontinued', $moduleInstance);
         if ($field) {
             $this->ExecuteQuery("update vtiger_field set defaultvalue='1' where fieldid=" . $field->id);
         }
         $moduleInstance = Vtiger_Module::getInstance('PriceBooks');
         $field = Vtiger_Field::getInstance('active', $moduleInstance);
         if ($field) {
             $this->ExecuteQuery("update vtiger_field set defaultvalue='1' where fieldid=" . $field->id);
         }
         $this->sendMsg('Changeset ' . get_class($this) . ' applied!');
         $this->markApplied();
     }
     $this->finishExecution();
 }
开发者ID:casati-dolibarr,项目名称:corebos,代码行数:29,代码来源:PdoSrvPBActiveDefaultValue.php


示例6: undoChange

 function undoChange()
 {
     if ($this->hasError()) {
         $this->sendError();
     }
     if ($this->isApplied()) {
         // undo your magic here
         $moduleInstance = Vtiger_Module::getInstance('Potentials');
         $field = Vtiger_Field::getInstance('forecast_amount', $moduleInstance);
         if ($field) {
             $this->ExecuteQuery('update vtiger_field set presence=1 where fieldid=' . $field->id);
         }
         global $adb;
         $wfrs = $adb->query("SELECT workflow_id FROM com_vtiger_workflows WHERE summary='Calculate or Update forecast amount'");
         if ($wfrs and $adb->num_rows($wfrs) == 1) {
             $wfid = $adb->query_result($wfrs, 0, 0);
             $this->deleteWorkflow($wfid);
             $this->sendMsg('Workflow deleted!');
         }
         $this->sendMsg('Changeset ' . get_class($this) . ' undone!');
         $this->markUndone();
     } else {
         $this->sendMsg('Changeset ' . get_class($this) . ' not applied!');
     }
     $this->finishExecution();
 }
开发者ID:casati-dolibarr,项目名称:corebos,代码行数:26,代码来源:PotentialForecastAmount.php


示例7: applyChange

 function applyChange()
 {
     global $adb;
     if ($this->hasError()) {
         $this->sendError();
     }
     if ($this->isApplied()) {
         $this->sendMsg('Changeset ' . get_class($this) . ' already applied!');
     } else {
         $moduleInstance = Vtiger_Module::getInstance('Users');
         $block = Vtiger_Block::getInstance('LBL_MORE_INFORMATION', $moduleInstance);
         $field = Vtiger_Field::getInstance('send_email_to_sender', $moduleInstance);
         if ($field) {
             $this->ExecuteQuery('update vtiger_field set presence=2 where fieldid=' . $field->id);
         } else {
             $user_field = new Vtiger_Field();
             $user_field->name = 'send_email_to_sender';
             $user_field->label = 'LBL_SEND_EMAIL_TO_SENDER';
             $user_field->table = 'vtiger_users';
             $user_field->column = 'send_email_to_sender';
             $user_field->columntype = 'varchar(3)';
             $user_field->typeofdata = 'C~O';
             $user_field->uitype = '56';
             $user_field->masseditable = '0';
             $block->addField($user_field);
             $this->ExecuteQuery("update vtiger_users set send_email_to_sender='1'");
             RecalculateSharingRules();
         }
         $this->sendMsg('Changeset ' . get_class($this) . ' applied!');
         $this->markApplied();
     }
     $this->finishExecution();
 }
开发者ID:casati-dolibarr,项目名称:corebos,代码行数:33,代码来源:UserSendEmailToSender.php


示例8: applyChange

 function applyChange()
 {
     global $adb;
     if ($this->hasError()) {
         $this->sendError();
     }
     if ($this->isApplied()) {
         $this->sendMsg('Changeset ' . get_class($this) . ' already applied!');
     } else {
         global $adb;
         $moduleInstance = Vtiger_Module::getInstance('Users');
         $block = Vtiger_Block::getInstance('LBL_CALENDAR_SETTINGS', $moduleInstance);
         if (!$block) {
             $block = new Vtiger_Block();
             $block->label = 'LBL_CALENDAR_SETTINGS';
             $block->sequence = 2;
             $moduleInstance->addBlock($block);
         }
         $this->ExecuteQuery('drop table if exists vtiger_hour_format');
         $this->ExecuteQuery('drop table if exists vtiger_start_hour');
         $field = Vtiger_Field::getInstance('hour_format', $moduleInstance);
         if ($field) {
             $this->ExecuteQuery('update vtiger_field set presence=2,uitype=16 where fieldid=' . $field->id);
         } else {
             $field = new Vtiger_Field();
             $field->name = 'hour_format';
             $field->label = 'Calendar Hour Format';
             $field->table = 'vtiger_users';
             $field->column = 'hour_format';
             $field->columntype = 'varchar(4)';
             $field->typeofdata = 'V~O';
             $field->uitype = '16';
             $field->masseditable = '0';
             $block->addField($field);
         }
         $field->setPicklistValues(array('12', '24'));
         $start_hour = Vtiger_Field::getInstance('start_hour', $moduleInstance);
         if ($start_hour) {
             $this->ExecuteQuery('update vtiger_field set presence=2,uitype=16 where fieldid=' . $start_hour->id);
         } else {
             $start_hour = new Vtiger_Field();
             $start_hour->name = 'start_hour';
             $start_hour->label = 'Day starts at';
             $start_hour->table = 'vtiger_users';
             $start_hour->column = 'start_hour';
             $start_hour->columntype = 'varchar(5)';
             $start_hour->typeofdata = 'V~O';
             $start_hour->uitype = '16';
             $start_hour->masseditable = '0';
             $block->addField($start_hour);
         }
         $start_hour->setPicklistValues(array('00:00', '01:00', '02:00', '03:00', '04:00', '05:00', '06:00', '07:00', '08:00', '09:00', '10:00', '11:00', '12:00', '13:00', '14:00', '15:00', '16:00', '17:00', '18:00', '19:00', '20:00', '21:00', '22:00', '23:00'));
         $this->sendMsg('Changeset ' . get_class($this) . ' applied!');
         $this->markApplied();
     }
     $this->finishExecution();
 }
开发者ID:casati-dolibarr,项目名称:corebos,代码行数:57,代码来源:UserHourStartFieldsList.php


示例9: getHeaders

 public function getHeaders()
 {
     $this->initListViewController();
     if (!$this->listviewHeaders) {
         $headerFieldModels = array();
         foreach ($this->listviewController->getListViewHeaderFields() as $fieldName => $webserviceField) {
             $fieldObj = Vtiger_Field::getInstance($webserviceField->getFieldId());
             $headerFieldModels[$fieldName] = Vtiger_Field_Model::getInstanceFromFieldObject($fieldObj);
         }
         $this->listviewHeaders = $headerFieldModels;
     }
     return $this->listviewHeaders;
 }
开发者ID:Bergdahls,项目名称:YetiForceCRM,代码行数:13,代码来源:MiniList.php


示例10: applyChange

 function applyChange()
 {
     global $adb;
     if ($this->hasError()) {
         $this->sendError();
     }
     if ($this->isApplied()) {
         $this->sendMsg('Changeset ' . get_class($this) . ' already applied!');
     } else {
         global $adb;
         $modname = 'Products';
         $module = Vtiger_Module::getInstance($modname);
         $block = Vtiger_Block::getInstance('LBL_PRICING_INFORMATION', $module);
         $field = Vtiger_Field::getInstance('cost_price', $module);
         if (!$field) {
             $field1 = new Vtiger_Field();
             $field1->name = 'cost_price';
             $field1->label = 'Cost Price';
             $field1->column = 'cost_price';
             $field1->columntype = 'DECIMAL(28,6)';
             $field1->uitype = 71;
             $field1->typeofdata = 'N~O';
             $field1->displaytype = 1;
             $field1->presence = 0;
             $block->addField($field1);
         }
         $modname = 'Services';
         $module = Vtiger_Module::getInstance($modname);
         $block = Vtiger_Block::getInstance('LBL_PRICING_INFORMATION', $module);
         $field = Vtiger_Field::getInstance('cost_price', $module);
         if (!$field) {
             $field1 = new Vtiger_Field();
             $field1->name = 'cost_price';
             $field1->label = 'Cost Price';
             $field1->column = 'cost_price';
             $field1->columntype = 'DECIMAL(28,6)';
             $field1->uitype = 71;
             $field1->typeofdata = 'N~O';
             $field1->displaytype = 1;
             $field1->presence = 0;
             $block->addField($field1);
         }
     }
     $this->sendMsg('Changeset ' . get_class($this) . ' applied!');
     $this->markApplied();
     $this->finishExecution();
 }
开发者ID:kduqi,项目名称:corebos,代码行数:47,代码来源:addCostPrice.php


示例11: applyChange

 function applyChange()
 {
     if ($this->hasError()) {
         $this->sendError();
     }
     if ($this->isApplied()) {
         $this->sendMsg('Changeset ' . get_class($this) . ' already applied!');
     } else {
         $moduleInstance = Vtiger_Module::getInstance('Vendors');
         $field = Vtiger_Field::getInstance('phone', $moduleInstance);
         if ($field) {
             $this->ExecuteQuery('update vtiger_field set uitype=11 where fieldid=' . $field->id);
         }
         $this->sendMsg('Changeset ' . get_class($this) . ' applied!');
         $this->markApplied();
     }
     $this->finishExecution();
 }
开发者ID:casati-dolibarr,项目名称:corebos,代码行数:18,代码来源:convertVendorPhoneToCorrectType.php


示例12: applyChange

 function applyChange()
 {
     if ($this->hasError()) {
         $this->sendError();
     }
     if ($this->isApplied()) {
         $this->sendMsg('Changeset ' . get_class($this) . ' already applied!');
     } else {
         $moduleInstance = Vtiger_Module::getInstance('Project');
         $field = Vtiger_Field::getInstance('targetbudget', $moduleInstance);
         if ($field) {
             $this->ExecuteQuery("update vtiger_field set typeofdata='N~O' where fieldid=" . $field->id);
         }
         $this->sendMsg('Changeset ' . get_class($this) . ' applied!');
         $this->markApplied();
     }
     $this->finishExecution();
 }
开发者ID:casati-dolibarr,项目名称:corebos,代码行数:18,代码来源:correctProjectTargetBudgetType.php


示例13: applyChange

 function applyChange()
 {
     if ($this->hasError()) {
         $this->sendError();
     }
     if ($this->isApplied()) {
         $this->sendMsg('Changeset ' . get_class($this) . ' already applied!');
     } else {
         global $adb;
         $moduleInstance = Vtiger_Module::getInstance('GlobalVariable');
         $field = Vtiger_Field::getInstance('gvname', $moduleInstance);
         if ($field) {
             $field->setPicklistValues(array('product_service_default'));
         }
         $this->sendMsg('Changeset ' . get_class($this) . ' applied!');
         $this->markApplied();
     }
     $this->finishExecution();
 }
开发者ID:casati-dolibarr,项目名称:corebos,代码行数:19,代码来源:gvServiceOrProduct.php


示例14: applyChange

 function applyChange()
 {
     if ($this->hasError()) {
         $this->sendError();
     }
     if ($this->isApplied()) {
         $this->sendMsg('Changeset ' . get_class($this) . ' already applied!');
     } else {
         $global_variables = array('product_service_default', 'Debug_Record_Not_Found', 'Product_Default_Units', 'Service_Default_Units', 'Maximum_Scheduled_Workflows', 'Billing_Address_Checked', 'Shipping_Address_Checked', 'Tax_Type_Default', 'calendar_call_default_duration', 'calendar_other_default_duration', 'calendar_sort_users_by', 'Debug_Send_VtigerCron_Error', 'Import_Full_CSV', 'Lead_Convert_TransferToAccount', 'Show_Copy_Adress_Header', 'SalesOrderStatusOnInvoiceSave', 'QuoteStatusOnSalesOrderSave');
         $moduleInstance = Vtiger_Module::getInstance('GlobalVariable');
         $field = Vtiger_Field::getInstance('gvname', $moduleInstance);
         if ($field) {
             $field->setPicklistValues($global_variables);
         }
         $this->sendMsg('Changeset ' . get_class($this) . ' applied!');
         $this->markApplied();
     }
     $this->finishExecution();
 }
开发者ID:jgjermeni,项目名称:corebos,代码行数:19,代码来源:DefineGlobalVariables.php


示例15: applyChange

 function applyChange()
 {
     global $adb;
     if ($this->hasError()) {
         $this->sendError();
     }
     if ($this->isApplied()) {
         $this->sendMsg('Changeset ' . get_class($this) . ' already applied!');
     } else {
         $moduleInstance = Vtiger_Module::getInstance('Products');
         $field = Vtiger_Field::getInstance('discontinued', $moduleInstance);
         if ($field) {
             $this->ExecuteQuery("update vtiger_field set typeofdata='C~O' where typeofdata='V~O' and fieldid=" . $field->id);
             $this->ExecuteQuery("update vtiger_field set typeofdata='C~M' where typeofdata='V~M' and fieldid=" . $field->id);
         }
         $this->sendMsg('Changeset ' . get_class($this) . ' applied!');
         $this->markApplied();
     }
     $this->finishExecution();
 }
开发者ID:kduqi,项目名称:corebos,代码行数:20,代码来源:PdoDiscontinuedToCheckbox.php


示例16: applyChange

 function applyChange()
 {
     if ($this->hasError()) {
         $this->sendError();
     }
     if ($this->isApplied()) {
         $this->sendMsg('Changeset ' . get_class($this) . ' already applied!');
     } else {
         $global_variables = array('Debug_Record_Not_Found', 'Debug_Report_Query', 'Debug_ListView_Query', 'Debug_Popup_Query', 'Debug_Send_VtigerCron_Error', 'Debug_Send_AdminLoginIPAuth_Error', 'Application_Global_Search_SelectedModules', 'Application_Storage_Directory', 'Application_Storage_SaveStrategy', 'Application_Global_Search_Binary', 'Application_OpenRecordInNewXOnRelatedList', 'Application_OpenRecordInNewXOnListView', 'Application_MaxFailedLoginAttempts', 'Application_ExpirePasswordAfterDays', 'Application_AdminLoginIPs', 'Application_ListView_MaxColumns', 'Application_Action_Panel_Open', 'Application_Search_Panel_Open', 'Calendar_Modules_Panel_Visible', 'Calendar_Default_Reminder_Minutes', 'Calendar_Slot_Minutes', 'Calendar_Show_Inactive_Users', 'Calendar_Show_Group_Events', 'calendar_call_default_duration', 'calendar_other_default_duration', 'calendar_sort_users_by', 'CronTasks_cronWatcher_mailto', 'BusinessMapping_SalesOrder2Invoice', 'BusinessMapping_PotentialOnCampaignRelation', 'Webservice_showUserAdvancedBlock', 'Users_ReplyTo_SecondEmail', 'Users_Default_Send_Email_Template', 'Accounts_BlockDuplicateName', 'Campaign_CreatePotentialOnAccountRelation', 'Campaign_CreatePotentialOnContactRelation', 'GoogleCalendarSync_BaseUpdateMonths', 'GoogleCalendarSync_BaseCreateMonths', 'Import_Full_CSV', 'Lead_Convert_TransferToAccount', 'Product_Copy_Bundle_OnDuplicate', 'Product_Show_Subproducts_Popup', 'Product_Permit_Relate_Bundle_Parent', 'Product_Permit_Subproduct_Be_Parent', 'Product_Maximum_Number_Images', 'Workflow_Send_Email_ToCCBCC', 'Workflow_GeoDistance_Country_Default', 'ModComments_DefaultCriteria', 'ModComments_DefaultBlockStatus', 'Report_Send_Scheduled_ifEmpty', 'Maximum_Scheduled_Workflows', 'Billing_Address_Checked', 'Shipping_Address_Checked', 'Show_Copy_Adress_Header', 'Tax_Type_Default', 'product_service_default', 'Product_Default_Units', 'Service_Default_Units', 'SalesOrderStatusOnInvoiceSave', 'QuoteStatusOnSalesOrderSave', 'Report.Excel.Export.RowHeight');
         $moduleInstance = Vtiger_Module::getInstance('GlobalVariable');
         $field = Vtiger_Field::getInstance('gvname', $moduleInstance);
         if ($field) {
             $field->setPicklistValues($global_variables);
         }
         $this->ExecuteQuery("ALTER TABLE `vtiger_globalvariable` CHANGE `value` `value` VARCHAR(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL;");
         $this->sendMsg('Changeset ' . get_class($this) . ' applied!');
         $this->markApplied();
     }
     $this->finishExecution();
 }
开发者ID:kduqi,项目名称:corebos,代码行数:20,代码来源:DefineGlobalVariables.php


示例17: applyChange

 function applyChange()
 {
     if ($this->hasError()) {
         $this->sendError();
     }
     if ($this->isApplied()) {
         $this->sendMsg('Changeset ' . get_class($this) . ' already applied!');
     } else {
         $global_variables = array('product_service_default', 'Debug_Record_Not_Found', 'Debug_Report_Query', 'Product_Default_Units', 'Service_Default_Units', 'Maximum_Scheduled_Workflows', 'Billing_Address_Checked', 'Shipping_Address_Checked', 'Tax_Type_Default', 'calendar_call_default_duration', 'calendar_other_default_duration', 'calendar_sort_users_by', 'Debug_Send_VtigerCron_Error', 'Import_Full_CSV', 'Lead_Convert_TransferToAccount', 'Show_Copy_Adress_Header', 'SalesOrderStatusOnInvoiceSave', 'QuoteStatusOnSalesOrderSave', 'GoogleCalendarSync_BaseUpdateMonths', 'GoogleCalendarSync_BaseCreateMonths', 'Report.Excel.Export.RowHeight', 'Calendar_Modules_Panel_Visible', 'Calendar_Default_Reminder_Minutes', 'Application_Global_Search_Binary', 'Calendar_Slot_Minutes', 'Users_ReplyTo_SecondEmail', 'Workflow_Send_Email_ToCCBCC', 'BusinessMapping_SalesOrder2Invoice', 'Calendar_Show_Inactive_Users', 'Campaign_CreatePotentialOnAccountRelation', 'Campaign_CreatePotentialOnContactRelation', 'BusinessMapping_PotentialOnCampaignRelation', 'Application_Global_Search_SelectedModules');
         $moduleInstance = Vtiger_Module::getInstance('GlobalVariable');
         $field = Vtiger_Field::getInstance('gvname', $moduleInstance);
         if ($field) {
             $field->setPicklistValues($global_variables);
         }
         $this->ExecuteQuery("ALTER TABLE `vtiger_globalvariable` CHANGE `value` `value` VARCHAR(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL;");
         $this->sendMsg('Changeset ' . get_class($this) . ' applied!');
         $this->markApplied();
     }
     $this->finishExecution();
 }
开发者ID:kikojover,项目名称:corebos,代码行数:20,代码来源:DefineGlobalVariables.php


示例18: applyChange

 function applyChange()
 {
     global $adb;
     if ($this->hasError()) {
         $this->sendError();
     }
     if ($this->isApplied()) {
         $this->sendMsg('Changeset ' . get_class($this) . ' already applied!');
     } else {
         $cbmaptypes = array('Record Access Control', 'Record Set Mapping', 'Module Set Mapping', 'ListColumns', 'DuplicateRelations', 'MasterDetailLayout');
         $moduleInstance = Vtiger_Module::getInstance('cbMap');
         $field = Vtiger_Field::getInstance('maptype', $moduleInstance);
         if ($field) {
             $field->setPicklistValues($cbmaptypes);
         }
         $this->sendMsg('Changeset ' . get_class($this) . ' applied!');
         $this->markApplied();
     }
     $this->finishExecution();
 }
开发者ID:kduqi,项目名称:corebos,代码行数:20,代码来源:cbMapAddMapTypes.php


示例19: applyChange

 function applyChange()
 {
     global $adb;
     if ($this->hasError()) {
         $this->sendError();
     }
     if ($this->isApplied()) {
         $this->sendMsg('Changeset ' . get_class($this) . ' already applied!');
     } else {
         global $adb;
         $vendorsInstance = Vtiger_Module::getInstance('Vendors');
         $blockInstance = Vtiger_Block::getInstance('LBL_VENDOR_INFORMATION', $vendorsInstance);
         $field = Vtiger_Field::getInstance('assigned_user_id', $vendorsInstance);
         if ($field) {
             $this->ExecuteQuery('update vtiger_field set presence=2 where fieldid=' . $field->id);
         } else {
             $field = new Vtiger_Field();
             $field->name = 'assigned_user_id';
             $field->label = 'Assigned To';
             $field->table = 'vtiger_crmentity';
             $field->column = 'smownerid';
             $field->columntype = 'INT(11)';
             $field->uitype = 53;
             $field->displaytype = 1;
             $field->typeofdata = 'V~M';
             $field->presence = 2;
             $field->quickcreate = 0;
             $field->quicksequence = 5;
             $blockInstance->addField($field);
             // Allow Sharing access and role-based security for Vendors
             Vtiger_Access::deleteSharing($vendorsInstance);
             Vtiger_Access::initSharing($vendorsInstance);
             Vtiger_Access::allowSharing($vendorsInstance);
             Vtiger_Access::setDefaultSharing($vendorsInstance);
         }
         $this->sendMsg('Changeset ' . get_class($this) . ' applied!');
         $this->markApplied();
     }
     $this->finishExecution();
 }
开发者ID:casati-dolibarr,项目名称:corebos,代码行数:40,代码来源:makeVendorShareable.php


示例20: applyChange

    function applyChange()
    {
        global $adb;
        if ($this->hasError()) {
            $this->sendError();
        }
        if ($this->isApplied()) {
            $this->sendMsg('Changeset ' . get_class($this) . ' already applied!');
        } else {
            global $adb;
            $moduleInstance = Vtiger_Module::getInstance('ModComments');
            $block = Vtiger_Block::getInstance('LBL_OTHER_INFORMATION', $moduleInstance);
            $field = Vtiger_Field::getInstance('relatedassignedemail', $moduleInstance);
            if ($field) {
                $this->ExecuteQuery('update vtiger_field set presence=2 where fieldid=' . $field->id);
            } else {
                $modfield = new Vtiger_Field();
                $modfield->name = 'relatedassignedemail';
                $modfield->label = 'Related Assigned Email';
                $modfield->table = $moduleInstance->basetable;
                $modfield->column = 'relatedassignedemail';
                $modfield->columntype = 'varchar(254)';
                $modfield->typeofdata = 'E~O';
                $modfield->uitype = '13';
                $modfield->displaytype = 2;
                // read only
                $modfield->masseditable = '0';
                $block->addField($modfield);
            }
            $this->ExecuteQuery('UPDATE vtiger_modcomments
				INNER JOIN vtiger_crmentity on crmid=related_to
				INNER JOIN vtiger_users on id = smownerid
				SET relatedassignedemail = email1');
            $this->sendMsg('Changeset ' . get_class($this) . ' applied!');
            $this->markApplied();
        }
        $this->finishExecution();
    }
开发者ID:casati-dolibarr,项目名称:corebos,代码行数:38,代码来源:modcommentsassignedtoemail.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Vtiger_Field_Model类代码示例发布时间:2022-05-23
下一篇:
PHP Vtiger_DetailView_Model类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap