本文整理汇总了PHP中variable_del函数的典型用法代码示例。如果您正苦于以下问题:PHP variable_del函数的具体用法?PHP variable_del怎么用?PHP variable_del使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了variable_del函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: hook_cleaner_settings
/**
* Create Cleaner settings form.
*
* @return array
* Form of the cleaner settings page.
*/
function hook_cleaner_settings()
{
// Add CSS to the admin settings page.
drupal_add_css(drupal_get_path('module', 'cleaner') . '/cleaner.css');
$form = array();
$yes_no = array(t('No'), t('Yes'));
$inline = array('class' => array('container-inline'));
$interval = array(0 => t('Every time')) + Cleaner::$intervals;
$form['cleaner_cron'] = array('#type' => 'radios', '#title' => t('Run interval'), '#options' => $interval, '#default_value' => variable_get('cleaner_cron', 3600), '#description' => t('This is how often the options below will occur. The actions will occur on the next Cron run after this interval expires. "Every time" means on every Cron run.'), '#attributes' => $inline);
$form['cleaner_clear_cache'] = array('#type' => 'radios', '#options' => $yes_no, '#title' => t('Clean up cache'), '#default_value' => variable_get('cleaner_clear_cache', 0), '#description' => Cleaner::cleanerGetCacheTablesTable(), '#attributes' => $inline);
$form['cleaner_empty_watchdog'] = array('#type' => 'radios', '#options' => $yes_no, '#title' => t('Clean up Watchdog'), '#default_value' => variable_get('cleaner_empty_watchdog', 0), '#description' => t('There is a standard setting for controlling Watchdog contents. This is more useful for test sites.'), '#attributes' => $inline);
$cookie = session_get_cookie_params();
$select = db_select('sessions', 's')->fields('s', array('timestamp'))->condition('timestamp', REQUEST_TIME - $cookie['lifetime'], '<');
$count = $select->execute()->rowCount();
$form['cleaner_clean_sessions'] = array('#type' => 'radios', '#options' => $yes_no, '#title' => t('Clean up Sessions table'), '#default_value' => variable_get('cleaner_clean_sessions', 0), '#description' => t('The sessions table can quickly become full with old, abandoned sessions. This will delete all sessions older than @interval (as set by your site administrator). There are currently @count such sessions.', array('@interval' => format_interval($cookie['lifetime']), '@count' => $count)), '#attributes' => $inline);
$form['cleaner_clean_cssdir'] = array('#type' => 'radios', '#options' => $yes_no, '#title' => t('Clean up CSS files'), '#default_value' => variable_get('cleaner_clean_cssdir', 0), '#description' => t('The CSS directory can become full with stale and outdated cache files. This will delete all CSS cache files but the latest.'), '#attributes' => $inline);
$form['cleaner_clean_jsdir'] = array('#type' => 'radios', '#options' => $yes_no, '#title' => t('Clean up JS files'), '#default_value' => variable_get('cleaner_clean_jsdir', 0), '#description' => t('The JS directory can become full with stale and outdated cache files. This will delete all JS cache files but the latest.'), '#attributes' => $inline);
// We can only offer OPTIMIZE to MySQL users.
if (db_driver() == 'mysql') {
$form['cleaner_optimize_db'] = array('#type' => 'radios', '#options' => $yes_no + array('2' => 'Local only'), '#title' => t('Optimize tables with "overhead" space'), '#default_value' => variable_get('cleaner_optimize_db', 0), '#description' => t('The module will compress (optimize) all database tables with unused space. <strong>NOTE</strong>: During an optimization, the table will locked against any other activity; on a high vloume site, this may be undesirable. "Local only" means do not replicate the optimization (if it is being done).'), '#attributes' => $inline);
} else {
// If not MySQL, delete(reset) the variable.
variable_del('cleaner_optimize_db');
}
return array('cleaner' => $form);
}
开发者ID:Net-Escola,项目名称:htdocs,代码行数:32,代码来源:cleaner.api.php
示例2: doVariablesCleanupByTemplate
/**
* Cleans up variables by template.
*/
public static function doVariablesCleanupByTemplate($template)
{
$result = db_query("\n SELECT name FROM {variable}\n WHERE name LIKE '" . $template . "'");
foreach ($result as $row) {
variable_del($row->name);
}
}
开发者ID:kastowo,项目名称:idbigdata,代码行数:10,代码来源:CommonUtils.php
示例3: reset_settings
/**
* Resets module settings
*/
public function reset_settings()
{
variable_del('mylivechat_id');
variable_del('mylivechat_displaytype');
variable_del('mylivechat_membership');
variable_del('mylivechat_encrymode');
variable_del('mylivechat_encrykey');
}
开发者ID:sandbox10,项目名称:sandbox,代码行数:11,代码来源:mylivechat.php
示例4: restTearDown
/**
* Tear down REST test.
*
* Call this from tearDown() method of your test class.
*/
protected function restTearDown()
{
// Delete storage.
unset($this->responseStorage);
// Unset response file variable.
variable_del('site_test_rest_response_file');
$this->refreshVariablesRunner();
}
开发者ID:alexdesignworks,项目名称:site_test_rest,代码行数:13,代码来源:site_rest_test_case.php
示例5: variable_move
function variable_move($old, $new)
{
$val = variable_get($old, NULL);
if (!is_null($value)) {
variable_set($new, $val);
variable_del($old);
}
}
开发者ID:rollinsb1010,项目名称:bbcom,代码行数:8,代码来源:oss-db-update.php
示例6: vdel
/**
* Method for deleting a key and its value from the caching mechanism.
*
* @param string $key
* The key that will be deleted, along with its value.
*
* @return NULL
* Returns after corresponding delete functionality finishes.
*/
public function vdel($key)
{
if ($this->memcacheExists) {
$this->mem->clear($key);
return;
}
variable_del($key);
}
开发者ID:etype-services,项目名称:moser,代码行数:17,代码来源:NodeRevisionCleanupVariableCRUD.php
示例7: marketplace_reset_settings
function marketplace_reset_settings()
{
global $theme_key;
variable_del('theme_' . $theme_key . '_settings');
variable_del('theme_settings');
$cache =& drupal_static('theme_get_setting', array());
$cache[$theme_key] = NULL;
}
开发者ID:AppConcur,项目名称:islacart,代码行数:8,代码来源:theme-settings.php
示例8: clearAll
/**
* Clear all Zeitgeist cache entries.
*/
public static function clearAll()
{
$known_cids = array_keys(static::getCids());
foreach ($known_cids as $cid) {
$core_cid = static::prefixCid($cid);
cache_clear_all($core_cid, Cache::BIN);
}
variable_del(static::VARCIDS);
}
开发者ID:agroknow,项目名称:agreri,代码行数:12,代码来源:Cache.php
示例9: restoreVariables
/**
* Restores the initial values of the Drupal variables.
*
* @AfterScenario
*/
public function restoreVariables()
{
foreach ($this->initialVariables as $variable => $value) {
if ($value === NULL) {
variable_del($variable);
} else {
variable_set($variable, $value);
}
}
}
开发者ID:ec-europa,项目名称:platform-dev,代码行数:15,代码来源:VariableContext.php
示例10: baseSetUp
/**
* Sets up modules for API tests, and saves the default branch for teardown.
*/
function baseSetUp()
{
// This is restored in the tearDown() function.
$this->default_branch = variable_get('api_default_branch', NULL);
variable_del('api_default_branch');
DrupalWebTestCase::setUp('drupal_queue', 'grammar_parser', 'ctools', 'api');
include_once drupal_get_path('module', 'api') . '/api.admin.inc';
include_once drupal_get_path('module', 'api') . '/parser.inc';
drupal_queue_include();
// Set up a super-user.
$this->super_user = $this->drupalCreateUser(array('access API reference', 'administer API reference', 'access content', 'access administration pages', 'administer blocks', 'administer nodes'));
$this->drupalLogin($this->super_user);
}
开发者ID:mattbyrnes,项目名称:Drupal-API,代码行数:16,代码来源:api_test_case.php
示例11: gd_cache_admin_settings_submit
function gd_cache_admin_settings_submit($form, &$form_state) {
$text = StringHelper::trim($form_state['values']['resources']);
$resourceIds = isset($text) ? gd_cache_parse_resources($text): NULL;
$storageValue = isset($resourceIds) ? implode("\n", $resourceIds) : NULL;
if (isset($storageValue)) {
variable_set(VARIABLE_NAME__CACHE_URL, $storageValue);
$message = t('@count URLs saved', array('@count' => count($resourceIds)));
}
else {
variable_del(VARIABLE_NAME__CACHE_URL);
$message = t('List of URLs is cleared');
}
drupal_set_message($message);
}
开发者ID:reisystems-india,项目名称:GovDashboard-Community,代码行数:16,代码来源:gd_cache.admin.php
示例12: handle
/**
* Implements AcsfEventHandler::handle().
*/
public function handle()
{
drush_print(dt('Entered @class', array('@class' => get_class($this))));
if (!$this->isComplete()) {
$site = acsf_get_acsf_site();
$site->clean();
variable_del('acsf_duplication_scrub_status');
variable_set('site_name', $this->event->context['site_name']);
variable_set('install_time', time());
// As a preparatory step, remove any corrupt file entries that may prevent
// duplication from succeeding. Specifically, remove any file with an
// empty URI string.
db_delete('file_managed')->condition('uri', '')->execute();
$this->setComplete();
}
}
开发者ID:robtryson,项目名称:nysits,代码行数:19,代码来源:AcsfDuplicationScrubInitializeHandler.php
示例13: brafton_admin_form_submit
function brafton_admin_form_submit($form, &$form_state)
{
//reset the error report
if ($form_state['values']['brafton_clear_report']) {
variable_set('brafton_e_log', '');
//variable_set('brafton_clear_report', 0);
}
//runs importer if archive is loaded
//Handles background image for videos
if ($form_state['values']['brafton_video_end_cta_background'] != '') {
$file = file_load($form_state['values']['brafton_video_end_cta_background']);
// Change status to permanent.
$file->status = FILE_STATUS_PERMANENT;
// Save.
$newfile = file_save($file);
$name = basename('brafton.module', '.module');
file_usage_add($newfile, $name, $name, $newfile->fid);
variable_set('brafton_video_end_cta_background_url', $newfile->uri);
variable_set('brafton_video_end_cta_background_id', $newfile->fid);
} else {
if (!$form_state['values']['brafton_video_end_cta_background']['fid']) {
variable_set('brafton_video_end_cta_background_url', '');
variable_del('brafton_video_end_cta_background_id');
}
}
//Handles Button Image for videos
if ($form_state['values']['brafton_video_end_cta_button_image'] != '') {
$file = file_load($form_state['values']['brafton_video_end_cta_button_image']);
// Change status to permanent.
$file->status = FILE_STATUS_PERMANENT;
// Save.
$newfile = file_save($file);
$name = basename('brafton.module', '.module');
file_usage_add($newfile, $name, $name, $newfile->fid);
variable_set('brafton_video_end_cta_button_image_url', $newfile->uri);
variable_set('brafton_video_end_cta_button_image_id', $newfile->fid);
} else {
if (!$form_state['values']['brafton_video_end_cta_button_image']['fid']) {
variable_set('brafton_video_end_cta_button_image_url', '');
variable_del('brafton_video_end_cta_button_image_id');
}
}
//Ensure that the run manual imports
$form_state['values']['brafton_clear_report'] = 0;
}
开发者ID:ContentLEAD,项目名称:BraftonDrupal7Module,代码行数:45,代码来源:braftonAdmin.php
示例14: tac_admin_submit
function tac_admin_submit($form, &$form_state)
{
db_delete('tac_map')->execute();
$vocabulary = $form_state['values']['vocabulary'];
if ($vocabulary > 0 && $vocabulary != variable_get('tac_vocabulary')) {
variable_set('tac_vocabulary', $vocabulary);
node_access_needs_rebuild(TRUE);
return;
} elseif ($vocabulary <= 0) {
variable_del('tac_vocabulary');
node_access_needs_rebuild(TRUE);
return;
}
$insert = db_insert('tac_map')->fields(array('rid', 'tid', 'grant_list', 'grant_create', 'grant_update', 'grant_delete'));
foreach ($form_state['values']['edit'] as $rid => $terms) {
foreach ($terms as $tid => $grants) {
$insert->values(array($rid, $tid, $grants['list'], $grants['create'], $grants['update'], $grants['delete']));
}
}
$insert->execute();
}
开发者ID:rgamb,项目名称:UNL-CMS,代码行数:21,代码来源:tac.admin.php
示例15: handle
/**
* Implements AcsfEventHandler::handle().
*/
public function handle()
{
drush_print(dt('Entered @class', array('@class' => get_class($this))));
$options = $this->event->context['scrub_options'];
variable_del('cron_last');
variable_del('cron_semaphore');
variable_del('node_cron_last');
variable_del('drupal_private_key');
variable_set('cron_key', drupal_hash_base64(drupal_random_bytes(55)));
// Ensure Drupal filesystem related configuration variables are correct for
// the new site. Consider the following variables:
// - file_directory_path
// - file_directory_temp
// - file_private_path
// - file_temporary_path
// Given the AH environment for Gardens, we want to leave the temp paths
// alone, and we want to delete the other variables, to ensure they reset to
// their defaults (because of scarecrow, these shouldn't exist in the
// variable table anyway).
$file_path_variables = array('file_directory_path', 'file_private_path');
foreach ($file_path_variables as $variable) {
variable_del($variable);
}
}
开发者ID:robtryson,项目名称:nysits,代码行数:27,代码来源:AcsfDuplicationScrubConfigurationHandler.php
示例16: dirname
*
* @author: David L. Heskett (contractor: Adaptive Solutions Group)
* @date Created: 01/13/2011
*
*/
// using Drush, attempt to simulate the "cron" process that should occur, because oaiharvester cron is totally busted and unreliable, so workaround ...
// drush php-script <filename less the .php>
// drush php-script manualOaiHarvesterCron
$harvestId = 9;
$includePath = dirname(__FILE__) . '/';
//require_once($includePath . 'manualOaiHarvester.php');
//return;
require_once $includePath . 'manualOaiHarvesterModel.php';
// prevent crons colliding, there can be only one highlander
$nameHarvestRunning = 'harvest_running_' . $harvestId;
$flagHarvestRunning = variable_get($nameHarvestRunning, false);
if ($flagHarvestRunning) {
return;
}
variable_set($nameHarvestRunning, 1);
$x = new manualOaiHarvesterModel();
$msg = 'harvest id:' . $harvestId;
$x->myOaiLogMsg($msg);
$msg = 'Start:' . date('YmdHis');
$x->myOaiLogMsg($msg);
// get started
$x->manualOaiHarvesterCron($harvestId);
$msg = 'End:' . date('YmdHis');
$x->myOaiLogMsg($msg);
variable_del($nameHarvestRunning);
// **************************************************
开发者ID:hoangbktech,项目名称:bhl-bits,代码行数:31,代码来源:oai_x_9.php
示例17: hook_node_type_delete
/**
* Act on node type deletion.
*
* This hook allows modules to take action when a node type is deleted.
*
* @param $info
* The node type object which is being deleted.
*/
function hook_node_type_delete($info)
{
variable_del('comment_' . $info->type);
}
开发者ID:nicklewisatx,项目名称:drupal,代码行数:12,代码来源:node.api.php
示例18: install_tasks
/**
* Tasks performed after the database is initialized.
*/
function install_tasks($profile, $task)
{
global $base_url, $install_locale;
// Bootstrap newly installed Drupal, while preserving existing messages.
$messages = isset($_SESSION['messages']) ? $_SESSION['messages'] : '';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
$_SESSION['messages'] = $messages;
// URL used to direct page requests.
$url = $base_url . '/install.php?locale=' . $install_locale . '&profile=' . $profile;
// Build a page for final tasks.
if (empty($task)) {
variable_set('install_task', 'profile-install');
$task = 'profile-install';
}
// We are using a list of if constructs here to allow for
// passing from one task to the other in the same request.
// Install profile modules.
if ($task == 'profile-install') {
$modules = variable_get('install_profile_modules', array());
$files = module_rebuild_cache();
variable_del('install_profile_modules');
$operations = array();
foreach ($modules as $module) {
$operations[] = array('_install_module_batch', array($module, $files[$module]->info['name']));
}
$batch = array('operations' => $operations, 'finished' => '_install_profile_batch_finished', 'title' => st('Installing @drupal', array('@drupal' => drupal_install_profile_name())), 'error_message' => st('The installation has encountered an error.'));
// Start a batch, switch to 'profile-install-batch' task. We need to
// set the variable here, because batch_process() redirects.
variable_set('install_task', 'profile-install-batch');
batch_set($batch);
batch_process($url, $url);
}
// We are running a batch install of the profile's modules.
// This might run in multiple HTTP requests, constantly redirecting
// to the same address, until the batch finished callback is invoked
// and the task advances to 'locale-initial-import'.
if ($task == 'profile-install-batch') {
include_once 'includes/batch.inc';
$output = _batch_page();
}
// Import interface translations for the enabled modules.
if ($task == 'locale-initial-import') {
if (!empty($install_locale) && $install_locale != 'en') {
include_once 'includes/locale.inc';
// Enable installation language as default site language.
locale_add_language($install_locale, NULL, NULL, NULL, NULL, NULL, 1, TRUE);
// Collect files to import for this language.
$batch = locale_batch_by_language($install_locale, '_install_locale_initial_batch_finished');
if (!empty($batch)) {
// Remember components we cover in this batch set.
variable_set('install_locale_batch_components', $batch['#components']);
// Start a batch, switch to 'locale-batch' task. We need to
// set the variable here, because batch_process() redirects.
variable_set('install_task', 'locale-initial-batch');
batch_set($batch);
batch_process($url, $url);
}
}
// Found nothing to import or not foreign language, go to next task.
$task = 'configure';
}
if ($task == 'locale-initial-batch') {
include_once 'includes/batch.inc';
include_once 'includes/locale.inc';
$output = _batch_page();
}
if ($task == 'configure') {
if (variable_get('site_name', FALSE) || variable_get('site_mail', FALSE)) {
// Site already configured: This should never happen, means re-running
// the installer, possibly by an attacker after the 'install_task' variable
// got accidentally blown somewhere. Stop it now.
install_already_done_error();
}
$form = drupal_get_form('install_configure_form', $url);
if (!variable_get('site_name', FALSE) && !variable_get('site_mail', FALSE)) {
// Not submitted yet: Prepare to display the form.
$output = $form;
drupal_set_title(st('Configure site'));
// Warn about settings.php permissions risk
$settings_dir = './' . conf_path();
$settings_file = $settings_dir . '/settings.php';
if (!drupal_verify_install_file($settings_file, FILE_EXIST | FILE_READABLE | FILE_NOT_WRITABLE) || !drupal_verify_install_file($settings_dir, FILE_NOT_WRITABLE, 'dir')) {
drupal_set_message(st('All necessary changes to %dir and %file have been made, so you should remove write permissions to them now in order to avoid security risks. If you are unsure how to do so, please consult the <a href="@handbook_url">on-line handbook</a>.', array('%dir' => $settings_dir, '%file' => $settings_file, '@handbook_url' => 'http://drupal.org/getting-started')), 'error');
} else {
drupal_set_message(st('All necessary changes to %dir and %file have been made. They have been set to read-only for security.', array('%dir' => $settings_dir, '%file' => $settings_file)));
}
// Add JavaScript validation.
_user_password_dynamic_validation();
drupal_add_js(drupal_get_path('module', 'system') . '/system.js', 'module');
// We add these strings as settings because JavaScript translation does not
// work on install time.
drupal_add_js(array('copyFieldValue' => array('edit-site-mail' => array('edit-account-mail')), 'cleanURL' => array('success' => st('Your server has been successfully tested to support this feature.'), 'failure' => st('Your system configuration does not currently support this feature. The <a href="http://drupal.org/node/15365">handbook page on Clean URLs</a> has additional troubleshooting information.'), 'testing' => st('Testing clean URLs...'))), 'setting');
drupal_add_js('
// Global Killswitch
if (Drupal.jsEnabled) {
$(document).ready(function() {
Drupal.cleanURLsInstallCheck();
//.........这里部分代码省略.........
开发者ID:alexismb5,项目名称:ckan-drupal,代码行数:101,代码来源:install.php
示例19: add_bundle_setting_form_submit
/**
* Submit callback for the bundle edit form.
*/
public function add_bundle_setting_form_submit($form, &$form_state, $bundle, $type_location)
{
// Some types do not support changing bundles, so we don't check if it's
// not possible to change.
if ($type_location) {
$new_bundle = drupal_array_get_nested_value($form_state['values'], $type_location);
} else {
$new_bundle = $bundle;
}
// Check to see if the bundle has changed. If so, we need to move stuff
// around.
if ($bundle && $new_bundle != $bundle) {
// Remove old settings.
variable_del('panelizer_defaults_' . $this->entity_type . '_' . $bundle);
$allowed_layouts = variable_get('panelizer_' . $this->entity_type . ':' . $bundle . '_allowed_layouts', NULL);
if ($allowed_layouts) {
variable_del('panelizer_' . $this->entity_type . ':' . $bundle . '_allowed_layouts');
variable_set('panelizer_' . $this->entity_type . ':' . $new_bundle . '_allowed_layouts', $allowed_layouts);
}
$default = variable_get('panelizer_' . $this->entity_type . ':' . $bundle . '_default', NULL);
if ($default) {
variable_del('panelizer_' . $this->entity_type . ':' . $bundle . '_default');
variable_set('panelizer_' . $this->entity_type . ':' . $new_bundle . '_default', $default);
}
// Load up all panelizer defaults for the old bundle and resave them
// for the new bundle.
$panelizer_defaults = $this->get_default_panelizer_objects($bundle);
if (!empty($panelizer_defaults)) {
foreach ($panelizer_defaults as $panelizer) {
list($entity_type, $old_bundle, $name) = explode(':', $panelizer->name);
$panelizer->name = implode(':', array($entity_type, $new_bundle, $name));
if ($panelizer->view_mode != 'page_manager') {
$panelizer->name .= ':' . $panelizer->view_mode;
}
// The default display selection.
$old_variable_name = 'panelizer_' . $this->entity_type . ':' . $bundle . ':' . $panelizer->view_mode . '_selection';
$new_variable_name = 'panelizer_' . $this->entity_type . ':' . $new_bundle . ':' . $panelizer->view_mode . '_selection';
$default_layout = variable_get($old_variable_name, NULL);
if (!is_null($default_layout)) {
variable_set($new_variable_name, $default_layout);
variable_del($old_variable_name);
}
$panelizer->panelizer_key = $new_bundle;
// If there's a pnid this should change the name and retain the pnid.
// If there is no pnid this will create a new one in the database
// because exported panelizer defaults attached to a bundle will have
// to be moved to the database in order to follow along and then be
// re-exported.
// @todo Should we warn the user about this?
ctools_export_crud_save('panelizer_defaults', $panelizer);
}
}
}
// Fix the configuration.
// If the main configuration is disabled then everything gets disabled.
if (empty($form_state['values']['panelizer']['status'])) {
$form_state['values']['panelizer']['view modes'] = array();
} elseif (!empty($form_state['values']['panelizer']['view modes'])) {
// Make sure each setting is disabled if the view mode is disabled.
foreach ($form_state['values']['panelizer']['view modes'] as $view_mode => &$config) {
if (empty($config['status'])) {
foreach ($config as $key => $val) {
$config[$key] = 0;
}
}
}
}
// Save the default display for this bundle to a variable so that it may be
// controlled separately.
foreach ($this->get_default_panelizer_objects($new_bundle) as $panelizer) {
if (isset($form_state['values']['panelizer']['view modes'][$panelizer->view_mode]['selection'])) {
$variable_name = 'panelizer_' . $this->entity_type . ':' . $new_bundle . ':' . $panelizer->view_mode . '_selection';
$old_value = variable_get($variable_name, NULL);
$new_value = $form_state['values']['panelizer']['view modes'][$panelizer->view_mode]['selection'];
// Save the variable.
variable_set($variable_name, $new_value);
// Cleanup.
// Additional cleanup if the default display was changed.
if (!is_null($old_value) && $old_value != $new_value) {
// The user specifically requested that existing entities are to be
// updated to the new display.
if (!empty($form_state['values']['panelizer']['view modes'][$panelizer->view_mode]['default revert'])) {
$updated_count = db_update('panelizer_entity')->fields(array('name' => $new_value))->condition('name', $old_value)->execute();
drupal_set_message(t('@count @entity records were updated to the new Panelizer display for the @mode view mode.', array('@count' => $updated_count, '@entity' => $this->entity_type, '@mode' => $panelizer->view_mode)));
// If EntityCache is enabled, clear all records of this type. This
// is a little heavy-handed, but I don't believe there's an easy way
// to clear only entities of certain types without querying for them
// first, which could trigger an execution timeout.
if (module_exists('entitycache')) {
cache_clear_all('*', 'cache_entity_' . $this->entity_type, TRUE);
}
}
}
}
}
// Remove some settings that shouldn't be saved with the others.
if (!empty($form_state['values']['panelizer']['view modes'])) {
//.........这里部分代码省略.........
开发者ID:Probo-Demos,项目名称:drupal_github,代码行数:101,代码来源:PanelizerEntityDefault.class.php
示例20: uninstall
public static function uninstall()
{
variable_del('ldap_authentication_conf');
}
开发者ID:mrschleig,项目名称:sensdata,代码行数:4,代码来源:LdapAuthenticationConfAdmin.class.php
注:本文中的variable_del函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论