sfContext::getActionName PHP Method

getActionName() public method

Retrieve the action name for this context.
public getActionName ( ) : string
return string The currently executing action name, if one is set, otherwise null.
    public function getActionName()
    {
        // get the last action stack entry
        if ($this->factories['actionStack'] && ($lastEntry = $this->factories['actionStack']->getLastEntry())) {
            return $lastEntry->getActionName();
        }
    }

Usage Example

Exemplo n.º 1
0
 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);
 }
All Usage Examples Of sfContext::getActionName