Files
ROC/src/service/content/cms_partial_content.e
Jocelyn Fiat ecbcb6a5cb Added notion of CMS_CONTENT as ancestor of CMS_NODE.
Moved CMS_CONTENT_TYPE to core library.
Added basic and limited taxonomy query /taxonomy/term/{termid} .
2015-12-03 23:01:31 +01:00

74 lines
1.5 KiB
Plaintext

note
description: "[
Instance of CMS_CONTENT representing the minimal information
for a CMS_CONTENT.
]"
date: "$Date$"
revision: "$Revision$"
class
CMS_PARTIAL_CONTENT
inherit
CMS_CONTENT
create
make_empty
feature {NONE} -- Initialization
make_empty (a_content_type: READABLE_STRING_8)
require
type_not_blank: not a_content_type.is_whitespace
do
content_type := a_content_type
end
feature -- Access
title: detachable READABLE_STRING_32
-- Title associated with Current content.
content_type: READABLE_STRING_8
-- Associated content type name.
-- Page, Article, Blog, News, etc.
format: detachable READABLE_STRING_8
-- Format associated with `content' and `summary'.
-- For example: text, mediawiki, html, etc
link: detachable CMS_LOCAL_LINK
-- Associated menu link.
feature -- Element change
set_title (a_title: detachable READABLE_STRING_GENERAL)
do
if a_title = Void then
title := Void
else
create {STRING_32} title.make_from_string_general (a_title)
end
end
set_format (a_format: like format)
-- Assign `format' with `a_format'.
do
format := a_format
ensure
format_assigned: format = a_format
end
set_link (a_link: like link)
-- Assign `link' with `a_link'.
do
link := a_link
ensure
link_assigned: link = a_link
end
note
copyright: "2011-2015, Jocelyn Fiat, Javier Velilla, Eiffel Software and others"
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
end