n.n.static index page handler

package net.nehmer.static

 Methods

_can_handle_view (mixed $handler_id, array $args, array $data)

Can-Handle check against the article name.

We have to do this explicitly in can_handle already, otherwise we would hide all subtopics as the request switch accepts all argument count matches unconditionally.

Not applicable for the "index" handler, where the article name is fixed (see handle).

Parameters

$handler_id

mixedThe ID of the handler.

$args

arrayThe argument list.

$data

array&$data The local request data.

Returns

booleanTrue if the request can be handled, false otherwise.

_handler_view (mixed $handler_id, array $args, array $data)

Looks up an article to display.

If the handler_id is 'index', the index article is tried to be looked up, otherwise the article name is taken from args[0]. Triggered error messages are generated accordingly. A missing index will trigger a forbidden error, a missing regular article a 404 (from can_handle).

Note, that the article for non-index mode operation is automatically determined in the can_handle phase.

If create privileges apply, we relocate to the index creation article

Parameters

$handler_id

mixedThe ID of the handler.

$args

arrayThe argument list.

$data

array&$data The local request data.

_on_initialize ()

Maps the content topic from the request data to local member variables.

_show_view (mixed $handler_id, array $data)

Shows the loaded article.

Parameters

$handler_id

mixedThe ID of the handler.

$data

array&$data The local request data.

_load_datamanager ()

Internal helper, loads the datamanager for the current article.

Any error triggers a 500.

_load_index_article ()

_prepare_request_data ()

Simple helper which references all important members to the request data listing for usage within the style listing.

 Properties

 

\midcom_db_article $_article

The article to display
 

\midcom_db_topic $_content_topic

The content topic to use
 

\midcom_helper_datamanager2_datamanager $_datamanager

The Datamanager of the article to display.