diff --git a/config/routes.yaml b/config/routes.yaml index 680d0f4..ba85270 100644 --- a/config/routes.yaml +++ b/config/routes.yaml @@ -6,7 +6,7 @@ index: path: / - defaults: { _controller: App\Controller\MainController::indexAction } + defaults: { _controller: App\Controller\MainController::index } methods: [POST, GET] user_search_ajax: diff --git a/src/Controller/ApiController.php b/src/Controller/ApiController.php index 208cc50..d4ec2b4 100644 --- a/src/Controller/ApiController.php +++ b/src/Controller/ApiController.php @@ -15,7 +15,7 @@ class ApiController * * @ParamConverter("user", class="SkobkinPointToolsBundle:User") */ - public function lastUserSubscribersByIdAction(User $user, SubscriptionEventRepository $subscriptionEventRepository): Response + public function lastUserSubscribersById(User $user, SubscriptionEventRepository $subscriptionEventRepository): Response { $qb = $subscriptionEventRepository->createQueryBuilder('se'); $qb diff --git a/src/Controller/EventsController.php b/src/Controller/EventsController.php index d10ea46..4e33c7e 100644 --- a/src/Controller/EventsController.php +++ b/src/Controller/EventsController.php @@ -10,7 +10,7 @@ use Symfony\Component\HttpFoundation\{Request, Response}; class EventsController extends AbstractController { - public function lastAction(Request $request, SubscriptionEventRepository $eventRepository, PaginatorInterface $paginator): Response + public function last(Request $request, SubscriptionEventRepository $eventRepository, PaginatorInterface $paginator): Response { $eventsPagination = $paginator->paginate( $eventRepository->createLastSubscriptionEventsQuery(), diff --git a/src/Controller/MainController.php b/src/Controller/MainController.php index 26494f1..4ab4833 100644 --- a/src/Controller/MainController.php +++ b/src/Controller/MainController.php @@ -19,7 +19,7 @@ class MainController extends AbstractController ) { } - public function indexAction( + public function index( Request $request, UserRepository $userRepository, SubscriptionRepository $subscriptionRepository, @@ -56,7 +56,7 @@ class MainController extends AbstractController } /** Returns user search autocomplete data in JSON */ - public function searchUserAjaxAction(string $login, UserRepository $userRepository): JsonResponse + public function searchUserAjax(string $login, UserRepository $userRepository): JsonResponse { $result = []; diff --git a/src/Controller/PostController.php b/src/Controller/PostController.php index 60bee66..dd58c86 100644 --- a/src/Controller/PostController.php +++ b/src/Controller/PostController.php @@ -14,7 +14,7 @@ class PostController extends AbstractController /** * @ParamConverter("post", class="SkobkinPointToolsBundle:Blogs\Post") */ - public function showAction(Post $post, PostRepository $postRepository): Response + public function show(Post $post, PostRepository $postRepository): Response { if ((!$post->getAuthor()->isPublic()) || $post->getAuthor()->isWhitelistOnly()) { /** diff --git a/src/Controller/PublicFeedController.php b/src/Controller/PublicFeedController.php index 8521130..5ee067d 100644 --- a/src/Controller/PublicFeedController.php +++ b/src/Controller/PublicFeedController.php @@ -12,7 +12,7 @@ class PublicFeedController extends AbstractController { private const POSTS_PER_PAGE = 20; - public function indexAction(Request $request, PostRepository $postRepository, PaginatorInterface $paginator): Response + public function index(Request $request, PostRepository $postRepository, PaginatorInterface $paginator): Response { $postsPagination = $paginator->paginate( $postRepository->createPublicFeedPostsQuery(), diff --git a/src/Controller/UserController.php b/src/Controller/UserController.php index c46d4d5..824ded7 100644 --- a/src/Controller/UserController.php +++ b/src/Controller/UserController.php @@ -19,7 +19,7 @@ class UserController extends AbstractController ) { } - public function showAction( + public function show( Request $request, string $login, SubscriptionEventRepository $subscriptionEventRepository, @@ -40,7 +40,7 @@ class UserController extends AbstractController 10 ); - return $this->render('SkobkinPointToolsBundle:User:show.html.twig', [ + return $this->render('Web/User/show.html.twig', [ 'user' => $user, 'subscribers' => $userRepository->findUserSubscribersById($user->getId()), 'subscriptions_log' => $subscriberEventsPagination, @@ -48,12 +48,12 @@ class UserController extends AbstractController ]); } - public function topAction(UserRepository $userRepository, SubscriptionEventRepository $subscriptionEventRepository): Response + public function top(UserRepository $userRepository, SubscriptionEventRepository $subscriptionEventRepository): Response { $topUsers = $userRepository->getTopUsers(); $eventsByDay = $subscriptionEventRepository->getLastEventsByDay(); - return $this->render('@SkobkinPointTools/User/top.html.twig', [ + return $this->render('Web/User/top.html.twig', [ 'events_dynamic_chat' => $this->createEventsDynamicChart($eventsByDay), 'top_chart' => $this->createTopUsersGraph($topUsers), ]);