Actions methods

getAction( actionName )

Returns the action with the given actionName.
    actionName String
Returns: Action object or false if the action has not been mapped.

init

Initializes the module, loads the dependent module classes and calls the mapActions method on all available modules using Engine::callMethodOnAllModules.

isAction( actionName )

Checks if the action with the given actionName has been mapped.
    actionName String
Returns: Boolean

mapAction( actionName, action )

Maps an action for a module.
    actionName String
    action Action object
1
$e->Actions->mapAction(
2
"home",
3
new \Cherrycake\Action([
4
"moduleType" => \Cherrycake\ACTION_MODULE_TYPE_APP,
5
"moduleName" => "Home",
6
"methodName" => "homePage",
7
"request" => new \Cherrycake\Request([
8
"pathComponents" => false,
9
"parameters" => false
10
])
11
]);
12
);
Copied!

run

Parses the received query to find the corresponding action and runs it
Last modified 1yr ago