Variable path components
...
$e->Actions->mapAction(
"viewProduct",
new \Cherrycake\Actions\ActionHtml([
"moduleType" => ACTION_MODULE_TYPE_APP,
"moduleName" => "Products",
"methodName" => "view",
"request" => new \Cherrycake\Actions\Request([
"pathComponents" => [
new \Cherrycake\Actions\RequestPathComponent([
"type" => REQUEST_PATH_COMPONENT_TYPE_FIXED,
"string" => "product"
]),
new \Cherrycake\Actions\RequestPathComponent([
"type" => REQUEST_PATH_COMPONENT_TYPE_VARIABLE_NUMERIC,
"name" => "productId",
"securityRules" => [
SECURITY_RULE_NOT_EMPTY,
SECURITY_RULE_INTEGER,
SECURITY_RULE_POSITIVE
]
])
]
])
])
);
...Last updated