Simplify CMS_SERVICE initialization, and CMS server (launcher).

Renamed "layout" lib as "app_env" with APPLICATION_ENVIRONMENT interface.
  applied changed to callers.
Added CMS_THEME.has_region (a_name): BOOLEAN to know if a region is declared in a defined theme.
This commit is contained in:
2015-04-29 23:01:42 +02:00
parent 0eb2b70d0f
commit 6ff7a6493c
34 changed files with 214 additions and 154 deletions

View File

@@ -0,0 +1,65 @@
note
description: "[
CMS Environment providing file system locations for
- config
- application
- logs
- documentation
- themes
]"
date: "$Date: 2015-03-09 19:25:49 +0100 (lun., 09 mars 2015) $"
revision: "$Revision: 96797 $"
class
CMS_ENVIRONMENT
inherit
APPLICATION_ENVIRONMENT
create
make_default,
make_with_path,
make_with_directory_name
feature -- Access
theme_path: PATH
-- Directory for templates (HTML, etc).
local
p: detachable PATH
do
p := internal_theme_path
if p = Void then
p := www_path.extended ("theme")
internal_theme_path := p
end
Result := p
end
cms_config_ini_path: PATH
-- CMS Configuration file path.
local
p: detachable PATH
do
p := internal_cms_config_ini_path
if p = Void then
p := config_path.extended (cms_config_ini_name)
internal_cms_config_ini_path := p
end
Result := p
end
cms_config_ini_name: STRING
-- CMS Configuration file name.
-- Redefine to easily change the name.
do
Result := "cms.ini"
end
feature {NONE} -- Implementation
internal_theme_path: detachable like theme_path
internal_cms_config_ini_path: detachable like cms_config_ini_path
end