...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<?php
class MyPluginPlugin extends Plugin {
...
public function getActions() {
return array(
array(
'action' => "nav_primary_client", // The action to tie into
'uri' => "plugin/my_plugin/client_main/index/", // The URI to fetch when the action is needed
'name' => "Foo Bar", // The name used by Blesta to display for the action (e.g. The name of the link),
'options' => null // Options required for this action if any (e.g. array('key' => "value"))
)
);
}
}
?> |
The above example would register the link "Foo Bar" in the client interface's primary navigation. The link would point to /plugin/my_plugin/client_main/index/. The URI resolves to the ClientMain controller and index method. Here's what that might look like:
...