$_component
$_component : string
The name of the component, e.g. net.nehmer.static. Should be used whenever the component's name is required instead of hardcoding it.
n.n.static NAP interface class
Normally, it is enough if you override the members list_leaves() and get_node(). You usually don't even need to write a constructor, as the default one should be enough for your purposes. If you need extra initialization work done when "entering" a topic, use the event handler _on_set_object().
$_topic : \midcom_db_topic
The topic for which we are handling a request.
get_leaves() : array
Returns all leaves for the current content topic.
It will hide the index leaf from the NAP information unless we are in Autoindex mode. The leaves' titles are used as a description within NAP, and the toolbar will contain edit and delete links.
NAP compliant list of leaves.
set_object(\midcom_db_topic $topic) : boolean
Set a new content object. This updates the local configuration copy with the topic in question. It calls the event handler _on_set_object after initializing everything in case you need to do some custom initializations as well.
\midcom_db_topic | $topic | The topic to process. |
Indicating success.
_on_set_object() : boolean
Event handler called after a new topic has been set. The configuration is already loaded at this point.
Set this to false to indicate that you could not set this instance to the topic. NAP will abort loading this node and log the error accordingly. Return true if everything is fine.
get_workflow(string $identifier, array $options = array()) : \midcom\workflow\dialog
string | $identifier | |
array | $options |