public static function templateEdit() { extract(\Supernova\View::$values); $name = \Supernova\Core::$elements['controller']; $title = inject(__("Edit %name%: %item%"), array("name" => $name, "item" => ${$name})); $form = \Supernova\Form::create(array("model" => $name, "values" => ${$name})); $link = \Supernova\Helper::link(array("href" => \Supernova\Route::generateUrl(array("prefix" => \Supernova\Core::$elements['prefix'], "controller" => $name, "action" => "index")), "text" => __("<< Back"))); return "\n <h3>{$title}</h3>\n {$form}\n {$link}\n "; }
/** * Inicializa y limpia parametros */ public static function initialize() { date_default_timezone_set(TIMEZONE); \Supernova\Profiler::start(); \Supernova\Session::start(); \Supernova\Security::cleanAll(); \Supernova\Form::setContentType(); \Supernova\Translate::setLanguage(LANGUAGE_DEFAULT); self::setPostParameters(\Supernova\Security::sanitize($_POST)); self::setFilesParameters(\Supernova\Security::sanitize($_FILES)); }