public function HtaccessDisplayForm::htaccess_delete in Htaccess 8.2
File
- src/
Form/ HtaccessDisplayForm.php, line 102 - Administration pages.
Class
- HtaccessDisplayForm
- Defines a form to configure RSVP List module settings
Namespace
Drupal\htaccess\FormCode
public function htaccess_delete($id) {
// Check that the profile is not in use
$htaccess_check = db_select('htaccess', 'h')
->fields('h')
->condition('deployed', 1, '=')
->condition('id', array(
':id' => $id,
), 'IN')
->execute()
->fetchAssoc();
if ($htaccess_check) {
drupal_set_message(t('This htaccess\'s profile is currently in use'), 'error');
}
else {
$htaccess_get = db_delete('htaccess')
->condition('id', array(
':id' => $id,
))
->execute();
drupal_set_message(t('Htacces profile has been removed.'));
}
drupal_goto("admin/config/system/htaccess/deployment");
}