Moved library/src to src

This commit is contained in:
2015-01-27 19:58:13 +01:00
parent d97c4b1a4a
commit 5ddc2006e2
83 changed files with 255 additions and 92 deletions

11
src/hooks/cms_hook.e Normal file
View File

@@ -0,0 +1,11 @@
note
description: "[
Marker interface for CMS Hook
]"
date: "$Date: 2014-11-13 16:23:47 +0100 (jeu., 13 nov. 2014) $"
revision: "$Revision: 96085 $"
deferred class
CMS_HOOK
end

View File

@@ -0,0 +1,38 @@
note
description: "[
Summary description for {CMS_HOOK_AUTO_REGISTER}.
When inheriting from this class, the declared hooks are automatically
registered, otherwise, each descendant has to add it to the cms service
itself.
]"
date: "$Date: 2014-11-13 19:34:00 +0100 (jeu., 13 nov. 2014) $"
revision: "$Revision: 96086 $"
deferred class
CMS_HOOK_AUTO_REGISTER
inherit
CMS_HOOK
feature -- Hook
auto_subscribe_to_hooks (a_response: CMS_RESPONSE)
do
if attached {CMS_HOOK_MENU_SYSTEM_ALTER} Current as h_menu_system_alter then
a_response.subscribe_to_menu_system_alter_hook (h_menu_system_alter)
end
if attached {CMS_HOOK_MENU_ALTER} Current as h_menu_alter then
a_response.subscribe_to_menu_alter_hook (h_menu_alter)
end
if attached {CMS_HOOK_BLOCK} Current as h_block then
a_response.subscribe_to_block_hook (h_block)
end
if attached {CMS_HOOK_FORM_ALTER} Current as h_form then
a_response.subscribe_to_form_alter_hook (h_form)
end
if attached {CMS_HOOK_VALUE_TABLE_ALTER} Current as h_value then
a_response.subscribe_to_value_table_alter_hook (h_value)
end
end
end

View File

@@ -0,0 +1,26 @@
note
description: "[
Hook providing a way to alter a block.
]"
date: "$Date: 2014-11-19 20:00:19 +0100 (mer., 19 nov. 2014) $"
revision: "$Revision: 96123 $"
deferred class
CMS_HOOK_BLOCK
inherit
CMS_HOOK
feature -- Hook
block_list: ITERABLE [like {CMS_BLOCK}.name]
-- List of block names, managed by current object.
deferred
end
get_block_view (a_block_id: READABLE_STRING_8; a_response: CMS_RESPONSE)
-- Get block object identified by `a_block_id' and associate with `a_response'.
deferred
end
end

View File

@@ -0,0 +1,29 @@
note
description: "Summary description for {CMS_HOOK_BLOCK_HELPER}."
author: ""
date: "$Date: 2015-01-14 16:13:47 +0100 (mer., 14 janv. 2015) $"
revision: "$Revision: 96454 $"
deferred class
CMS_HOOK_BLOCK_HELPER
feature -- Factory
template_block (a_module: CMS_MODULE; a_block_id: READABLE_STRING_8; a_response: CMS_RESPONSE): detachable CMS_SMARTY_TEMPLATE_BLOCK
-- Smarty content block for `a_block_id' in the context of `a_module' and `a_response'.
local
p: detachable PATH
do
create p.make_from_string ("templates")
p := p.extended ("block_").appended (a_block_id).appended_with_extension ("tpl")
p := a_response.module_resource_path (a_module, p)
if p /= Void then
if attached p.entry as e then
create Result.make (a_block_id, Void, p.parent, e)
else
create Result.make (a_block_id, Void, p.parent, p)
end
end
end
end

View File

@@ -0,0 +1,21 @@
note
description: "[
Hook providing a way to alter a form.
]"
date: "$Date: 2014-11-13 16:23:47 +0100 (jeu., 13 nov. 2014) $"
deferred class
CMS_HOOK_FORM_ALTER
inherit
CMS_HOOK
feature -- Hook
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'.
deferred
end
end

View File

@@ -0,0 +1,21 @@
note
description: "[
Hook providing a way to alter a menu
]"
date: "$Date: 2014-11-13 16:23:47 +0100 (jeu., 13 nov. 2014) $"
deferred class
CMS_HOOK_MENU_ALTER
inherit
CMS_HOOK
feature -- Hook
menu_alter (a_menu: CMS_MENU; a_response: CMS_RESPONSE)
-- Hook execution on menu `a_menu'
-- for related response `a_response'.
deferred
end
end

View File

@@ -0,0 +1,21 @@
note
description: "[
Hook providing a way to alter the CMS menu system.
]"
date: "$Date: 2014-11-13 16:23:47 +0100 (jeu., 13 nov. 2014) $"
deferred class
CMS_HOOK_MENU_SYSTEM_ALTER
inherit
CMS_HOOK
feature -- Hook
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'.
deferred
end
end

View File

@@ -0,0 +1,30 @@
note
description: "[
Hook providing a way to alter the value table for a response.
]"
date: "$Date: 2014-11-13 16:23:47 +0100 (jeu., 13 nov. 2014) $"
revision: "$Revision: 96085 $"
deferred class
CMS_HOOK_VALUE_TABLE_ALTER
inherit
CMS_HOOK
feature -- Hook
value_table_alter (a_value: CMS_VALUE_TABLE; a_response: CMS_RESPONSE)
deferred
end
note
copyright: "2011-2014, Jocelyn Fiat, Eiffel Software and others"
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
source: "[
Eiffel Software
5949 Hollister Ave., Goleta, CA 93117 USA
Telephone 805-685-1006, Fax 805-685-6869
Website http://www.eiffel.com
Customer support http://support.eiffel.com
]"
end