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:
57
draft/application/cms/src/modules/cms_module.e
Normal file
57
draft/application/cms/src/modules/cms_module.e
Normal file
@@ -0,0 +1,57 @@
|
||||
note
|
||||
description: "Summary description for {WSF_CMS_MODULE}."
|
||||
author: ""
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
|
||||
deferred class
|
||||
CMS_MODULE
|
||||
|
||||
feature -- Access
|
||||
|
||||
is_enabled: BOOLEAN
|
||||
|
||||
name: STRING
|
||||
|
||||
description: STRING
|
||||
|
||||
package: STRING
|
||||
|
||||
version: STRING
|
||||
|
||||
feature {CMS_SERVICE} -- Registration
|
||||
|
||||
register (a_service: CMS_SERVICE)
|
||||
deferred
|
||||
end
|
||||
|
||||
feature -- Settings
|
||||
|
||||
enable
|
||||
do
|
||||
is_enabled := True
|
||||
end
|
||||
|
||||
disable
|
||||
do
|
||||
is_enabled := False
|
||||
end
|
||||
|
||||
feature -- Hooks
|
||||
|
||||
help_text (a_path: STRING): STRING
|
||||
do
|
||||
Result := ""
|
||||
end
|
||||
|
||||
permissions: LIST [TUPLE [title: detachable STRING; description: detachable STRING]]
|
||||
do
|
||||
create {ARRAYED_LIST [like permissions.item]} Result.make (0)
|
||||
end
|
||||
|
||||
links: HASH_TABLE [CMS_MODULE_LINK, STRING]
|
||||
-- Link indexed by path
|
||||
deferred
|
||||
end
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user