public function actionName() {
        $request = $this->stack->getCurrentRequest();
        if ($request instanceof Request) {
            $pattern = "#::([a-zA-Z]*)Action#";
            $matches = array();
            preg_match($pattern, $request->get('_controller'), $matches);
            if (isset($matches[1])) {
                return strtolower($matches[1]);
            }

            return '';
        }

        return '';
    }
public function actionName() {
        $request = $this->stack->getCurrentRequest();
        if ($request instanceof Request) {
            $pattern = "#::([a-zA-Z]*)Action#";
            $matches = array();
            preg_match($pattern, $request->get('_controller'), $matches);
            if (isset($matches[1])) {
                return strtolower($matches[1]);
            }

            return '';
        }

        return '';
    }
public function actionName ( ) { $ request = $ this -> stack -> getCurrentRequest ( ) ; if ( $ request instanceof Request ) { $ pattern = "#::([a-zA-Z]*)Action#" ; $ matches = array ( ) ; preg_match ( $ pattern , $ request -> get ( '_controller' ) , $ matches ) ; if ( isset ( $ matches [ 1 ] ) ) { return strtolower ( $ matches [ 1 ] ) ; } return '' ; } return '' ; }
Get current action name
Get current action name