本文整理汇总了PHP中DynamicField::dropField方法的典型用法代码示例。如果您正苦于以下问题:PHP DynamicField::dropField方法的具体用法?PHP DynamicField::dropField怎么用?PHP DynamicField::dropField使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DynamicField
的用法示例。
在下文中一共展示了DynamicField::dropField方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: FieldsMetaData
* Portions created by SugarCRM are Copyright (C) 2004-2006 SugarCRM, Inc.;
* All Rights Reserved.
* Contributor(s): ______________________________________.
********************************************************************************/
require_once 'modules/EditCustomFields/EditCustomFields.php';
require_once 'modules/DynamicFields/DynamicField.php';
require_once 'modules/DynamicFields/DynamicField.php';
if (!empty($_REQUEST['record'])) {
$fields_meta_data = new FieldsMetaData($_REQUEST['record']);
$fields_meta_data->retrieve($_REQUEST['record']);
$module = $fields_meta_data->custom_module;
$custom_fields = new DynamicField($module);
if (!empty($module)) {
$class_name = $beanList[$module];
$class_file = $class_name;
if ($class_file == 'aCase') {
$class_file = 'Case';
}
require_once "modules/{$module}/{$class_file}.php";
$mod = new $class_name();
$custom_fields->setup($mod);
} else {
echo "\nNo Module Included Could Not Delete";
}
$custom_fields->dropField($fields_meta_data->name);
$fields_meta_data->mark_deleted($_REQUEST['record']);
}
$return_module = empty($_REQUEST['return_module']) ? 'EditCustomFields' : $_REQUEST['return_module'];
$return_action = empty($_REQUEST['return_action']) ? 'index' : $_REQUEST['return_action'];
$return_module_select = empty($_REQUEST['module_name']) ? 0 : $_REQUEST['module_name'];
header("Location: index.php?action={$return_action}&module={$return_module}&module_name={$return_module_select}");
示例2: DynamicField
function uninstall_custom_fields($fields)
{
global $beanList, $beanFiles;
require_once 'modules/DynamicFields/DynamicField.php';
$dyField = new DynamicField();
foreach ($fields as $field) {
$class = $beanList[$field['module']];
if (file_exists($beanFiles[$class])) {
require_once $beanFiles[$class];
$mod = new $class();
$dyField->bean = $mod;
$dyField->module = $field['module'];
$dyField->dropField($field['name']);
}
}
}