$_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.
org.openpsa.calendar NAP interface class.
NAP is mainly used for toolbar rendering in this component
$_topic : \midcom_db_topic
The topic for which we are handling a request.
get_leaves() : array
Leaf listing function, the default implementation returns an empty array indicating no leaves. Note, that the active leaf index set by the other parts of the component must match one leaf out of this list.
Here are some code fragments, that you usually connect through some kind of QB array:
<?php
foreach ($articles as $article) { $leaves[$article->id] = array ( MIDCOM_NAV_URL => $article->name . "/", MIDCOM_NAV_NAME => $article->title, MIDCOM_NAV_OBJECT => $article, MIDCOM_NAV_GUID => $article->guid, ) }
return $leaves;
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 |