static string getModuleScope(
)
|
|
Returns the current module scope.
API Tags:
static void resetModuleScope(
)
|
|
Resets the current module scope.
static void setModuleScope(
string
$module
)
|
|
Set current module scope.
Parameters:
|
string |
$module: |
current module |
atkModule atkModule(
[String
$name = ""]
)
|
|
Constructor. The module needs to register it's nodes overhere, create its menuitems etc.
Parameters:
|
String |
$name: |
The name of the module. |
This method is similar to the getPreferenceLinks() method but instead will return links to (an) admin page(s) for this module. The array which will be returned have to be created with the adminlink() method.
API Tags:
| Return: | with admin links for this module |
Returns an array with filenames of attributes that need to be included in order to let this module work properly.
API Tags:
| Return: | with attribute filenames |
string getFixturePath(
string
$fixture
)
|
|
Returns the fixture path for the given fixture.
Parameters:
|
string |
$fixture: |
<module.fixture> string |
API Tags:
| Return: | path to fixture without extension |
This method returns an array with menu items that need to be available
in the main ATK menu. This function returns the array created with the menuitem() method, and does not have to be extended!
API Tags:
| Return: | with menu items for this module |
Redefined in descendants as:
array getModifierFunctions(
&$node, atkNode
$node
)
|
|
Get the modifier functions for this node
Parameters:
API Tags:
| Return: | Array with modifier function names |
string getNodeFile(
string
$node
)
|
|
Returns the node file for the given node.
Parameters:
|
string |
$node: |
the node type |
API Tags:
Register nodes with their supported actions. Can be used for security etc.
Redefined in descendants as:
array getPreferenceLinks(
)
|
|
This method can be used to return an array similar to the menu array but with links to (a) preference(s) page(s) for this module. The items that will be returned have to be added with the preferencelink() method.
API Tags:
| Return: | with preference links for this module |
void menuitem(
[String
$name = ""], [String
$url = ""], [String
$parent = "main"], [mixed
$enable = 1], [int
$order = 0]
)
|
|
Create a new menu item, optionally configuring access control. This function can also be used to create separators, submenus and submenu items.
Parameters:
|
String |
$name: |
The menuitem name. The name that is displayed in the userinterface can be influenced by putting "menu_something" in the language files, where 'something' is equal to the $name parameter. If "-" is specified as name, the item is a separator. In this case, the $url parameter should be empty. |
|
String |
$url: |
The url to load in the main application area when the menuitem is clicked. If set to "", the menu is treated as a submenu (or a separator if $name equals "-"). The dispatch_url() method is a useful function to pass as this parameter. |
|
String |
$parent: |
The parent menu. If omitted or set to "main", the item is added to the main menu. |
|
mixed |
$enable: |
This parameter supports the following options: 1: menuitem is always enabled 0: menuitem is always disabled (this is useful when you want to use a function call to determine when a menuitem should be enabled. If the function returns 1 or 0, it can directly be passed to this method in the $enable parameter. array: when an array is passed, it should have the following format: array("node","action","node","action",...) When an array is passed, the menu checks user privileges. If the user has any of the node/action privileges, the menuitem is enabled. Otherwise, it's disabled. |
|
int |
$order: |
The order in which the menuitem appears. If omitted, the items appear in the order in which they are added to the menu, with steps of 100. So, if you have a menu with default ordering and you want to place a new menuitem at the third position, pass 250 for $order. |
void modifier(
&$node, atkNode
$node
)
|
|
Modifies the given node
Parameters:
|
atkNode |
$node: |
Node to be modified |
|
|
&$node: |
|
Construct a new node. A module can override this method for it's own nodes.
Parameters:
API Tags:
Redefined in descendants as:
node nodeExists(
string
$node
)
|
|
Checks if a certain node exists for this module.
Parameters:
|
string |
$node: |
the node type |
API Tags:
Redefined in descendants as:
string nodeOverloader(
string
$node
)
|
|
Returns the node overloader if it exists. Else it will just return the module/node name of the given node.
Parameters:
|
string |
$node: |
module/node string |
API Tags:
| Return: | (overloader) module/node string |