CMSimple_XH
|
Reliable information about published and hidden pages. More...
Public Member Functions | |
__construct (array $removed) | |
Initializes a new instance. More... | |
isPublished ($index) | |
Returns whether a page is published. More... | |
isHidden ($index) | |
Returns whether a page is hidden. More... | |
getFirstPublishedPage () | |
Returns the index of the first published page. More... | |
Reliable information about published and hidden pages.
Publisher respects #cmsimple hide#
and #cmsimple remove#
as well as the page data fields linked_to_menu
, published
, publication_date
and expires
. Note that unpublishing via #cmsimple remove#
cannot be detected by other means except for Publisher::isPublished(), because it is replaced during content loading. Also note that all pages are published and none is hidden in edit mode.
XH\Publisher::__construct | ( | array | $removed | ) |
Initializes a new instance.
bool[] | $removed | The removed status of the pages. |
XH\Publisher::getFirstPublishedPage | ( | ) |
Returns the index of the first published page.
XH\Publisher::isHidden | ( | $index | ) |
Returns whether a page is hidden.
A page may be hidden either by #cmsimple hide#
or via the page data field linked_to_menu
. Note that unpublished pages are not reported as being hidden by this method. Note that all descendants of a hidden page are also regarded as being hidden.
int | $index | A page index. |
XH\Publisher::isPublished | ( | $index | ) |
Returns whether a page is published.
A page may be unpublished either by #cmsimple remove#
or via the page data fields published
, publication_date
and expires
. Note that all descendants of an unpublished page are also regarded as being unpublished.
int | $index | A page index. |