Retrieve the action name for this context.
public getActionName ( ) : string | ||
return | string | The currently executing action name, if one is set, otherwise null. |
public static function decomposeURL(sfContext $context, sfRequest $request) { $module = $context->getModuleName(); $action = $context->getActionName(); $parameters = $request->getParameterHolder()->getAll(); return array("module" => $module, "action" => $action, "parameters" => $parameters); }
/** * Get the current action name, with translatio, if possible * * @param sfContext $context * * @return string */ public static function getActionName(sfContext $context) { $modulename = $context->getModuleName(); $actionname = $context->getActionName(); $translation = self::getProperty("translator", array()); return isset($translation[$modulename]["actions"][$actionname]) ? $translation[$modulename]["actions"][$actionname] : $actionname; }