Maslosoft Framework Documentation
Flexible Application Foundation
Action Namer
Often it is required to get human readable name of module, controller or action.
There is a helper class ActionNamer
to achieve this task.
Using action namer
To create name, call nameAction()
method.
This method creates human readable name of module, controller, action.
This accepts parameters either as route, dotted route:
$params = '/uac/user/view';
$params = 'moduleId'; // Module name
$params = 'moduleId.controllerId'; // Controller name
$params = 'moduleId.controllerId.actionId'; // Action name
Or as an array
$params = [
'moduleId',
'controllerId',
'actionId'
];
It will return human readable label, which can be set by @Label
annotation
on either module or controller class or on action method.