private function findModuleInRoute($route)
    {
        $route = parse_url($route, PHP_URL_PATH);
        
        $parts = array_values(array_filter(explode('/', $route)));
        
        if (isset($parts[0]) && array_key_exists($parts[0], Yii::$app->getApplicationModules())) {
            return $parts[0];
        }
    
        return false;
    }