public static function editForm($novica = []) { if (empty($novica)) { $rules = ["id" => ['filter' => FILTER_VALIDATE_INT, 'options' => ['min_range' => 1]]]; $data = filter_input_array(INPUT_GET, $rules); $novica = NovicaDB::get($data); } echo ViewHelper::render("view/editor/novica-edit.php", ["novica" => $novica]); }