note description: "Summary description for {STRIPE_MODULE_ADMINISTRATION}." author: "" date: "$Date$" revision: "$Revision$" class STRIPE_MODULE_ADMINISTRATION inherit CMS_MODULE_ADMINISTRATION [STRIPE_MODULE] redefine setup_hooks, permissions end CMS_HOOK_AUTO_REGISTER CMS_HOOK_MENU_SYSTEM_ALTER CMS_HOOK_FORM_ALTER create make feature -- Security permissions: LIST [READABLE_STRING_8] -- List of permission ids, used by this module, and declared. do Result := Precursor Result.force ("admin stripe") end feature {NONE} -- Router/administration setup_administration_router (a_router: WSF_ROUTER; a_api: CMS_API) -- do if attached module.stripe_api as l_mod_api then a_router.handle ("/stripe/settings/", create {STRIPE_SETTINGS_ADMIN_HANDLER}.make (l_mod_api), a_router.methods_get_post) end end feature -- Hooks configuration setup_hooks (a_hooks: CMS_HOOK_CORE_MANAGER) -- Module hooks configuration. do a_hooks.subscribe_to_menu_system_alter_hook (Current) end menu_system_alter (a_menu_system: CMS_MENU_SYSTEM; a_response: CMS_RESPONSE) -- Hook execution on collection of menu contained by `a_menu_system' -- for related response `a_response'. local lnk: CMS_LOCAL_LINK do -- Add the link to the taxonomy to the main menu if a_response.has_permission ("admin stripe") then lnk := a_response.api.administration_link ("Stripe settings", "stripe/settings/") a_menu_system.management_menu.extend_into (lnk, "Admin", a_response.api.administration_path_location ("")) end end form_alter (a_form: CMS_FORM; a_form_data: detachable WSF_FORM_DATA; a_response: CMS_RESPONSE) -- Hook execution on form `a_form' and its associated data `a_form_data', -- for related response `a_response'. local do end end