Renamed CMS_RESPONSE.add_..hook with subscribe_to_..._hook

Renamed CMS_RESPONSE.call_..hook  with invoke_..._hook
Renamed CMS_HOOK_VALUE_ALTER as CMS_HOOK_VALUE_TABLE_ALTER
Renamed CMS_HOOK_MENU_ALTER as CMS_HOOK_MENU_SYSTEM_ALTER
Added new CMS_HOOK_MENU_ALTER that acts on CMS_MENU object.

Cosmetic, comments.
This commit is contained in:
2014-11-12 16:12:42 +01:00
parent 96ceb2481a
commit c3d48c47cc
12 changed files with 123 additions and 56 deletions

View File

@@ -13,7 +13,7 @@ inherit
register_hooks
end
CMS_HOOK_MENU_ALTER
CMS_HOOK_MENU_SYSTEM_ALTER
CMS_HOOK_BLOCK
@@ -45,8 +45,8 @@ feature -- Hooks
register_hooks (a_response: CMS_RESPONSE)
do
a_response.add_menu_alter_hook (Current)
a_response.add_block_hook (Current)
a_response.subscribe_to_menu_system_alter_hook (Current)
a_response.subscribe_to_block_hook (Current)
end
block_list: ITERABLE [like {CMS_BLOCK}.name]
@@ -56,7 +56,7 @@ feature -- Hooks
get_block_view (a_block_id: READABLE_STRING_8; a_response: CMS_RESPONSE)
local
b: CMS_CONTENT_BLOCK
-- b: CMS_CONTENT_BLOCK
mb: CMS_MENU_BLOCK
m: CMS_MENU
lnk: CMS_LOCAL_LINK
@@ -74,7 +74,7 @@ feature -- Hooks
end
end
menu_alter (a_menu_system: CMS_MENU_SYSTEM; a_response: CMS_RESPONSE)
menu_system_alter (a_menu_system: CMS_MENU_SYSTEM; a_response: CMS_RESPONSE)
local
lnk: CMS_LOCAL_LINK
-- perms: detachable ARRAYED_LIST [READABLE_STRING_8]