function views_ui::add_template_page
File
-
plugins/
export_ui/ views_ui.class.php, line 411
Class
- views_ui
- CTools Export UI class handler for Views UI.
Code
public function add_template_page($js, $input, $name, $step = NULL) {
$templates = views_get_all_templates();
if (empty($templates[$name])) {
return MENU_NOT_FOUND;
}
$template = $templates[$name];
// The template description probably describes the template, not the view
// that will be created from it, but users aren't that likely to touch it.
if (!empty($template->description)) {
unset($template->description);
}
$template->is_template = TRUE;
$template->type = t('Default');
$output = $this->clone_page($js, $input, $template, $step);
drupal_set_title(t('Create view from template @template', array(
'@template' => $template->get_human_name(),
)));
return $output;
}