src/Yggdrasil/Core/Routing/Router.php
public function getActionAlias(Request $request): string
    {
        $actionAlias = str_replace('/', ':', $request->query->get('route'));

        if (empty($actionAlias)) {
            return $this->getConfiguration()->getDefaultController() . ':' . $this->getConfiguration()->getDefaultAction();
        }

        if (!strpos($actionAlias, ':')) {
            return $actionAlias . ':' . $this->getConfiguration()->getDefaultAction();
        }

        $aliases = array_keys($this->getQueryMap([]));

        foreach ($aliases as $alias) {
            if (strtolower($alias) === strtolower($actionAlias)) {
                $actionAlias = $alias;

                break;
            }
        }

        return $actionAlias;
    }
public function getActionAlias(Request $request): string
    {
        $actionAlias = str_replace('/', ':', $request->query->get('route'));

        if (empty($actionAlias)) {
            return $this->getConfiguration()->getDefaultController() . ':' . $this->getConfiguration()->getDefaultAction();
        }

        if (!strpos($actionAlias, ':')) {
            return $actionAlias . ':' . $this->getConfiguration()->getDefaultAction();
        }

        $aliases = array_keys($this->getQueryMap([]));

        foreach ($aliases as $alias) {
            if (strtolower($alias) === strtolower($actionAlias)) {
                $actionAlias = $alias;

                break;
            }
        }

        return $actionAlias;
    }
public function getActionAlias ( Request $ request ) : string { $ actionAlias = str_replace ( '/' , ':' , $ request -> query -> get ( 'route' ) ) ; if ( empty ( $ actionAlias ) ) { return $ this -> getConfiguration ( ) -> getDefaultController ( ) . ':' . $ this -> getConfiguration ( ) -> getDefaultAction ( ) ; } if ( ! strpos ( $ actionAlias , ':' ) ) { return $ actionAlias . ':' . $ this -> getConfiguration ( ) -> getDefaultAction ( ) ; } $ aliases = array_keys ( $ this -> getQueryMap ( [ ] ) ) ; foreach ( $ aliases as $ alias ) { if ( strtolower ( $ alias ) === strtolower ( $ actionAlias ) ) { $ actionAlias = $ alias ; break ; } } return $ actionAlias ; }
Returns alias of active action

@param Request $request
@return string
@throws \Exception
Returns alias of active action