WIP: Symfony 6 project remake #2

Draft
skobkin wants to merge 103 commits from symfony6_remake into master
7 changed files with 11 additions and 11 deletions
Showing only changes of commit 2673272fc7 - Show all commits

View file

@ -6,7 +6,7 @@
index:
path: /
defaults: { _controller: App\Controller\MainController::indexAction }
defaults: { _controller: App\Controller\MainController::index }
methods: [POST, GET]
user_search_ajax:

View file

@ -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

View file

@ -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(),

View file

@ -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 = [];

View file

@ -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()) {
/**

View file

@ -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(),

View file

@ -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),
]);