本文整理汇总了PHP中DynamicField::deleteCache方法的典型用法代码示例。如果您正苦于以下问题:PHP DynamicField::deleteCache方法的具体用法?PHP DynamicField::deleteCache怎么用?PHP DynamicField::deleteCache使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DynamicField
的用法示例。
在下文中一共展示了DynamicField::deleteCache方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: process
function process($option)
{
switch ($option) {
case 'ViewCustomFields':
parent::process($option);
require_once 'modules/Studio/EditCustomFields/ListView.php';
break;
case 'CreateCustomFields':
if (empty($_REQUEST['to_pdf'])) {
parent::process($option);
}
require_once 'modules/Studio/EditCustomFields/EditView.php';
break;
case 'SaveCustomField':
require_once 'modules/Studio/EditCustomFields/Save.php';
break;
case 'DeleteCustomField':
require_once 'modules/Studio/EditCustomFields/Delete.php';
break;
case 'EditCustomField':
parent::process($option);
require_once 'modules/Studio/EditCustomFields/EditView.php';
break;
case 'ClearCache':
require_once 'modules/DynamicFields/DynamicField.php';
DynamicField::deleteCache();
echo '<script>YAHOO.util.Event.addListener(window, "load", function(){ajaxStatus.showStatus("cache cleared");window.setTimeout(\'ajaxStatus.hideStatus();\', 2000);});</script>';
parent::process($option);
break;
case 'RepairCustomFields':
header('Location: index.php?module=Administration&action=UpgradeFields');
sugar_cleanup(true);
default:
parent::process($option);
}
}
示例2: drop_tables
/**
* Delete the primary table for the module implementing the class.
* If custom fields were added to this table/module, the custom table will be removed too, along with the cache
* entries that define the custom fields.
*
*/
function drop_tables()
{
global $dictionary;
$key = $this->getObjectName();
if (!array_key_exists($key, $dictionary)) {
$GLOBALS['log']->fatal("drop_tables: Metadata for table " . $this->table_name . " does not exist");
echo "meta data absent for table " . $this->table_name . "<br>\n";
} else {
if (empty($this->table_name)) {
return;
}
if ($this->db->tableExists($this->table_name)) {
$this->dbManager->dropTable($this);
}
if ($this->db->tableExists($this->table_name . '_cstm')) {
$this->dbManager->dropTableName($this->table_name . '_cstm');
DynamicField::deleteCache();
}
if ($this->db->tableExists($this->get_audit_table_name())) {
$this->dbManager->dropTableName($this->get_audit_table_name());
}
}
}
示例3: unset
}
unset($fields[$col]);
echo "Dropping Column {$col} from {$mod->table_name}" . "_cstm for module {$the_module}<br>";
} else {
if ($col != 'id_c') {
//$db_data_type = $dbManager->helper->getColumnType(strtolower($the_field->data_type));
$db_data_type = strtolower(str_replace(' ', '', $the_field->get_db_type()));
$type = strtolower(str_replace(' ', '', $type));
if (strcmp($db_data_type, $type) != 0) {
echo "Fixing Column Type for {$col} changing {$type} to " . $db_data_type . "<br>";
if (!$simulate) {
$db->query($the_field->get_db_modify_alter_table($mod->table_name . '_cstm'));
}
}
}
unset($fields[$col]);
}
}
echo sizeof($fields) . " field(s) missing from {$mod->table_name}" . "_cstm<br>";
foreach ($fields as $field) {
echo "Adding Column {$field} to {$mod->table_name}" . "_cstm<br>";
if (!$simulate) {
$mod->custom_fields->add_existing_custom_field($field);
}
}
}
DynamicField::deleteCache();
echo '<br>Done<br>';
if ($simulate) {
echo '<a href="index.php?module=Administration&action=UpgradeFields&run=true">Execute non-simulation mode</a>';
}
示例4: dropFieldById
function dropFieldById($id)
{
$result = $GLOBALS['db']->query("SELECT custom_module, name FROM fields_meta_data WHERE id='{$id}'");
if ($row = $GLOBALS['db']->fetchByAssoc($result)) {
$GLOBALS['db']->query("DELETE FROM fields_meta_data WHERE id='{$id}'");
$db_name = ' COLUMN ' . $row['name'];
$module = $row['custom_module'];
if (!empty($GLOBALS['beanList'][$module])) {
$class = $GLOBALS['beanList'][$module];
require_once $GLOBALS['beanFiles'][$class];
$mod = new $class();
$GLOBALS['db']->query("ALTER TABLE " . $mod->table_name . "_cstm DROP {$db_name}");
}
}
DynamicField::deleteCache();
}