Updated CMS code.
Separated code to have a lib and an example. Improved design, fixed a few issues related to folder location. This is still experimental and require more work to be really friendly to use.
This commit is contained in:
50
draft/application/cms/src/modules/cms_module_link.e
Normal file
50
draft/application/cms/src/modules/cms_module_link.e
Normal file
@@ -0,0 +1,50 @@
|
||||
note
|
||||
description: "Summary description for {CMS_MODULE_LINK}."
|
||||
author: ""
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
|
||||
class
|
||||
CMS_MODULE_LINK
|
||||
|
||||
create
|
||||
make
|
||||
|
||||
feature {NONE} -- Initialization
|
||||
|
||||
make (a_title: like title)
|
||||
do
|
||||
title := a_title
|
||||
end
|
||||
|
||||
feature -- Access
|
||||
|
||||
title: STRING_32
|
||||
|
||||
description: detachable STRING_32
|
||||
|
||||
callback: detachable PROCEDURE [ANY, TUPLE [cms: detachable CMS_EXECUTION; args: detachable ITERABLE [STRING]]]
|
||||
callback_arguments: detachable ITERABLE [STRING]
|
||||
|
||||
permission: detachable LIST [STRING]
|
||||
|
||||
parent: detachable CMS_MODULE_LINK
|
||||
|
||||
feature -- Element change
|
||||
|
||||
set_callback (cb: like callback; args: like callback_arguments)
|
||||
do
|
||||
callback := cb
|
||||
callback_arguments := args
|
||||
end
|
||||
|
||||
feature -- Execution
|
||||
|
||||
execute
|
||||
do
|
||||
if attached callback as cb then
|
||||
cb.call ([Void, callback_arguments])
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user