public function updateTemplate($template_id, $template)
{
$ret = $this->getById($template_id);
if ($ret == null) {
\App::abort(404);
}
$object = array();
$object["display_title"] = $template->display_title;
$object["title"] = $template->title;
$object["tags"] = $template->tags;
$object["body"] = $template->body;
$wkey["id"] = $template_id;
$ret = $this->update($object, $wkey);
$template = $this->getById($template_id);
return $template;
}