本文整理汇总了PHP中Vtiger_Field::initialize方法的典型用法代码示例。如果您正苦于以下问题:PHP Vtiger_Field::initialize方法的具体用法?PHP Vtiger_Field::initialize怎么用?PHP Vtiger_Field::initialize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Vtiger_Field
的用法示例。
在下文中一共展示了Vtiger_Field::initialize方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: DeleteALLFields
function DeleteALLFields()
{
global $adb;
include_once 'vtlib/Vtiger/Module.php';
$take_info = $adb->query("select * from vtiger_field where tabid = '" . $this->tabid . "'", true, "Error DeleteAddedFields()");
foreach ($take_info as $single_field) {
$take_info = $adb->query("select * from vtiger_field where tabid = '" . $single_field['tabid'] . "' and fieldname = '" . $single_field['fieldname'] . "'", true, "Error DeleteAddedFields()");
if ($adb->num_rows($take_info) > 0) {
$valuemap = array();
$moduleInstance = Vtiger_Module::getInstance($single_field['module']);
$valuemap['fieldid'] = $adb->query_result($take_info, 0, 'fieldid');
$valuemap['fieldname'] = $adb->query_result($take_info, 0, 'fieldname');
$valuemap['fieldlabel'] = $adb->query_result($take_info, 0, 'fieldlabel');
$valuemap['columnname'] = $adb->query_result($take_info, 0, 'columnname');
$valuemap['tablename'] = $adb->query_result($take_info, 0, 'tablename');
$valuemap['uitype'] = $adb->query_result($take_info, 0, 'uitype');
$valuemap['typeofdata'] = $adb->query_result($take_info, 0, 'typeofdata');
$valuemap['block'] = $adb->query_result($take_info, 0, "block");
$fieldInstance = new Vtiger_Field();
$fieldInstance->initialize($valuemap, $moduleInstance);
$fieldInstance->delete();
}
}
$delete = $adb->query("delete from vtiger_fieldmodulerel where module = '" . $this->module_name . "' or relmodule = '" . $this->module_name . "' ", true, "Error DeleteAddedFields()");
}