Wikipage view handler

package net.nemein.wiki

 Methods

__construct ()

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

Can-Handle check against the current wikipage 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.

Parameters

$handler_id

mixedThe ID of the handler.

$args

arrayThe argument list.

$data

array&$data The local request data.

_handler_raw (mixed $handler_id, array $args, array $data, $view_mode)

Parameters

$handler_id

mixedThe ID of the handler.

$args

arrayThe argument list.

$data

array&$data The local request data.

$view_mode

_handler_source (mixed $handler_id, array $args, array $data, $view_mode)

Parameters

$handler_id

mixedThe ID of the handler.

$args

arrayThe argument list.

$data

array&$data The local request data.

$view_mode

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

Parameters

$handler_id

mixedThe ID of the handler.

$args

arrayThe argument list.

$data

array&$data The local request data.

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

Parameters

$handler_id

mixedThe ID of the handler.

$args

arrayThe argument list.

$data

array&$data The local request data.

$view_mode

_show_raw (mixed $handler_id, array $data)

Parameters

$handler_id

mixedThe ID of the handler.

$data

array&$data The local request data.

_show_source (mixed $handler_id, array $data)

Parameters

$handler_id

mixedThe ID of the handler.

$data

array&$data The local request data.

_show_view (mixed $handler_id, array $data)

Parameters

$handler_id

mixedThe ID of the handler.

$data

array&$data The local request data.

sort_by_title (\net_nemein_wiki_wikipage $a, \net_nemein_wiki_wikipage $b)

Callback for sorting wikipages by title
Static

Parameters

$a

\net_nemein_wiki_wikipage

$b

\net_nemein_wiki_wikipage

_autogenerate_toc ($content)

This function parses HTML content and looks for header tags, making index of them.

What exactly it does is looks for all H tags and converts them to named anchors, and prepends a list of links to them to the start of HTML.

todo Parse the heading structure to create OL subtrees based on their relative levels

Parameters

$content

_load_datamanager ()

Internal helper, loads the datamanager for the current wikipage.

Any error triggers a 500.

_load_page ($wikiword)

Parameters

$wikiword

_populate_toolbar ()

_toc_prefix ($level)

Parameters

$level

 Properties

 

\midcom_helper_datamanager2_controller $_controller

The Datamanager 2 controller of the article to display
 

\midcom_helper_datamanager2_datamanager $_datamanager

The Datamanager 2 for article to display
 

\net_nemein_wiki_wikipage $_page

The wikipage we're viewing