Fixing controller action names and routing configuration accordingly.
This commit is contained in:
parent
a58cd2a1ea
commit
2673272fc7
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
index:
|
index:
|
||||||
path: /
|
path: /
|
||||||
defaults: { _controller: App\Controller\MainController::indexAction }
|
defaults: { _controller: App\Controller\MainController::index }
|
||||||
methods: [POST, GET]
|
methods: [POST, GET]
|
||||||
|
|
||||||
user_search_ajax:
|
user_search_ajax:
|
||||||
|
|
|
@ -15,7 +15,7 @@ class ApiController
|
||||||
*
|
*
|
||||||
* @ParamConverter("user", class="SkobkinPointToolsBundle:User")
|
* @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 = $subscriptionEventRepository->createQueryBuilder('se');
|
||||||
$qb
|
$qb
|
||||||
|
|
|
@ -10,7 +10,7 @@ use Symfony\Component\HttpFoundation\{Request, Response};
|
||||||
|
|
||||||
class EventsController extends AbstractController
|
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(
|
$eventsPagination = $paginator->paginate(
|
||||||
$eventRepository->createLastSubscriptionEventsQuery(),
|
$eventRepository->createLastSubscriptionEventsQuery(),
|
||||||
|
|
|
@ -19,7 +19,7 @@ class MainController extends AbstractController
|
||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function indexAction(
|
public function index(
|
||||||
Request $request,
|
Request $request,
|
||||||
UserRepository $userRepository,
|
UserRepository $userRepository,
|
||||||
SubscriptionRepository $subscriptionRepository,
|
SubscriptionRepository $subscriptionRepository,
|
||||||
|
@ -56,7 +56,7 @@ class MainController extends AbstractController
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Returns user search autocomplete data in JSON */
|
/** Returns user search autocomplete data in JSON */
|
||||||
public function searchUserAjaxAction(string $login, UserRepository $userRepository): JsonResponse
|
public function searchUserAjax(string $login, UserRepository $userRepository): JsonResponse
|
||||||
{
|
{
|
||||||
$result = [];
|
$result = [];
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ class PostController extends AbstractController
|
||||||
/**
|
/**
|
||||||
* @ParamConverter("post", class="SkobkinPointToolsBundle:Blogs\Post")
|
* @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()) {
|
if ((!$post->getAuthor()->isPublic()) || $post->getAuthor()->isWhitelistOnly()) {
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -12,7 +12,7 @@ class PublicFeedController extends AbstractController
|
||||||
{
|
{
|
||||||
private const POSTS_PER_PAGE = 20;
|
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(
|
$postsPagination = $paginator->paginate(
|
||||||
$postRepository->createPublicFeedPostsQuery(),
|
$postRepository->createPublicFeedPostsQuery(),
|
||||||
|
|
|
@ -19,7 +19,7 @@ class UserController extends AbstractController
|
||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function showAction(
|
public function show(
|
||||||
Request $request,
|
Request $request,
|
||||||
string $login,
|
string $login,
|
||||||
SubscriptionEventRepository $subscriptionEventRepository,
|
SubscriptionEventRepository $subscriptionEventRepository,
|
||||||
|
@ -40,7 +40,7 @@ class UserController extends AbstractController
|
||||||
10
|
10
|
||||||
);
|
);
|
||||||
|
|
||||||
return $this->render('SkobkinPointToolsBundle:User:show.html.twig', [
|
return $this->render('Web/User/show.html.twig', [
|
||||||
'user' => $user,
|
'user' => $user,
|
||||||
'subscribers' => $userRepository->findUserSubscribersById($user->getId()),
|
'subscribers' => $userRepository->findUserSubscribersById($user->getId()),
|
||||||
'subscriptions_log' => $subscriberEventsPagination,
|
'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();
|
$topUsers = $userRepository->getTopUsers();
|
||||||
$eventsByDay = $subscriptionEventRepository->getLastEventsByDay();
|
$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),
|
'events_dynamic_chat' => $this->createEventsDynamicChart($eventsByDay),
|
||||||
'top_chart' => $this->createTopUsersGraph($topUsers),
|
'top_chart' => $this->createTopUsersGraph($topUsers),
|
||||||
]);
|
]);
|
||||||
|
|
Loading…
Reference in a new issue