function node_convert_delete_template in Node Convert 7
Delete a conversion template. This function is also called by ctools export when calls are made through ctools_export_crud_delete().
Parameters
$template: A conversion template.
$ctools_crud: Is this function called by the ctools crud delete.
1 call to node_convert_delete_template()
- node_convert_template_delete_confirm_submit in ./
node_convert.admin.inc - Submit callback for delete template confirmation form.
1 string reference to 'node_convert_delete_template'
- node_convert_schema in ./
node_convert.install - Node convert schema.
File
- ./
node_convert.module, line 394
Code
function node_convert_delete_template($template, $ctools_crud = TRUE) {
$query = db_delete('node_convert_templates');
if (is_object($template) && isset($template->nctid)) {
$query
->condition('nctid', $template->nctid);
}
elseif (is_array($template) && isset($template['template_id'])) {
$query
->condition('nctid', $template['template_id']);
}
elseif (is_string($template)) {
$template_name = $template;
$query
->condition('machine_name', $template_name);
}
$query
->execute();
ctools_include('export');
ctools_export_load_object_reset(NODE_CONVERT_TEMPLATE_TABLE);
}