function domain_conf_data_delete in Domain Access 7.3
Deletes domain specific settings.
Parameters
int|string $domain_id: Domain ID to delete configuration for. Use the string 'all' to delete the configrations for all domains.
6 calls to domain_conf_data_delete()
- DomainConfTestCase::testCrudUtilities in domain_conf/
tests/ domain_conf.test - Base test assertions for the CRUD layer in Domain Conf.
- DomainConfTestCase::testDomainConfDataGetCashes in domain_conf/
tests/ domain_conf.test - domain_conf_domain_delete in domain_conf/
domain_conf.domain.inc - Implements hook_domain_delete().
- domain_conf_features_rebuild in domain_conf/
domain_conf.features.inc - Implements hook_features_rebuild().
- domain_conf_reset_form_submit in domain_conf/
domain_conf.admin.inc - FormsAPI for domain_conf_reset_form().
File
- domain_conf/
domain_conf.module, line 144 - Domain manager configuration options.
Code
function domain_conf_data_delete($domain_id) {
$wildcard = $domain_id === 'all';
// Remove from source.
$query = db_delete('domain_conf');
if (!$wildcard) {
$query
->condition('domain_id', (int) $domain_id);
}
$query
->execute();
// Remove from the static cache for any subsequent gets.
$static_cache_get =& drupal_static('domain_conf_data_get', array());
if ($wildcard) {
$static_cache_get = array();
}
else {
unset($static_cache_get[$domain_id]);
}
}