public static function get_view() { $object = new self(); $object->init(); $object->check_authorizations(); $object->build_form(AppContext::get_request()); if ($object->submit_button->has_been_submited() && $object->form->validate()) { $id = $object->save(); AppContext::get_response()->redirect(GuestbookUrlBuilder::home($object->is_new_message ? 1 : $object->form->get_value('page'), $id)); } $object->view->put('FORM', GuestbookAuthorizationsService::check_authorizations()->write() && !AppContext::get_current_user()->is_readonly() ? $object->form->display() : ''); return $object->view; }
public static function get_view() { $object = new self(); $object->check_authorizations(); $object->init(); $object->build_form(AppContext::get_request()); return $object->view; }