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

@@ -1,7 +1,10 @@
note
description: "Summary description for {CMS_VALUE_TABLE}."
date: "$Date: 2014-10-23 08:30:11 -0300 (ju. 23 de oct. de 2014) $"
revision: "$Revision: 95980 $"
description: "[
Object containing a collection of values.
It is typically used by `{CMS_RESPONSE}.values' .
]"
date: "$Date$"
revision: "$Revision$"
class
CMS_VALUE_TABLE

View File

@@ -19,7 +19,7 @@ feature -- Basic operation
prepare (a_response: CMS_RESPONSE)
do
a_response.call_form_alter_hooks (Current, Void)
a_response.invoke_form_alter (Current, Void)
end
process (a_response: CMS_RESPONSE)
@@ -29,7 +29,7 @@ feature -- Basic operation
on_prepared (a_response: CMS_RESPONSE; fd: WSF_FORM_DATA)
do
a_response.call_form_alter_hooks (Current, fd)
a_response.invoke_form_alter (Current, fd)
end
on_processed (a_response: CMS_RESPONSE; fd: WSF_FORM_DATA)

View File

@@ -1,7 +1,9 @@
note
description: "Describe the navigation menus."
date: "$Date: 2014-08-28 08:21:49 -0300 (ju. 28 de ago. de 2014) $"
revision: "$Revision: 95708 $"
description: "[
Menu associated with CMS system.
]"
date: "$Date$"
revision: "$Revision$"
class
CMS_MENU_SYSTEM
@@ -20,15 +22,17 @@ feature {NONE} -- Initialization
do
to_implement ("Refactor, take the info from a Database or Configuration file.")
create items.make (5)
force (create {CMS_MENU}.make ("primary", 3)) -- primary menu
force (create {CMS_MENU}.make_with_title ("management", "Management", 3)) -- secondary in admin view.
force (create {CMS_MENU}.make_with_title ("secondary", "Navigation", 3)) -- secondary
force (create {CMS_MENU}.make_with_title ("user", "User", 3)) -- first_side_bar
force (create {CMS_MENU}.make ("primary", 3))
force (create {CMS_MENU}.make_with_title ("management", "Management", 3))
force (create {CMS_MENU}.make_with_title ("secondary", "Navigation", 3))
force (create {CMS_MENU}.make_with_title ("user", "User", 3))
end
feature -- Access
item (n: like {CMS_MENU}.name): CMS_MENU
-- Menu associated with name `n',
-- if none, it is created.
local
m: detachable CMS_MENU
do
@@ -80,6 +84,7 @@ feature -- Access
feature -- Change
force (m: CMS_MENU)
-- Add menu `m'.
do
items.force (m, m.name)
end
@@ -94,7 +99,6 @@ feature -- Access
feature {NONE} -- Implementation
items: HASH_TABLE [CMS_MENU, like {CMS_MENU}.name]
-- items: ARRAYED_LIST [CMS_MENU]
items: STRING_TABLE [CMS_MENU]
end