Ojs\JournalBundle\Controller\ManagerController::userIndexAction PHP Метод

userIndexAction() публичный Метод

public userIndexAction ( ) : Response
Результат Symfony\Component\HttpFoundation\Response
    public function userIndexAction()
    {
        $switcher = $userJournals = null;
        $articles = $this->getDoctrine()->getRepository('OjsJournalBundle:Article')->findBy(['submitterUser' => $this->getUser()], ['submissionDate' => 'DESC']);
        $journalUsers = array();
        if ($this->getUser()->isAdmin()) {
            $switcher = $this->createForm(new QuickSwitchType(), null)->createView();
        } else {
            $journalUsers = $this->getDoctrine()->getRepository('OjsJournalBundle:JournalUser')->findBy(['user' => $this->getUser()]);
            foreach ($journalUsers as $journalUserKey => $journalUser) {
                if ($journalUser->getJournal()->getStatus() == JournalStatuses::STATUS_REJECTED) {
                    unset($journalUsers[$journalUserKey]);
                }
            }
        }
        $response = $this->render('OjsJournalBundle:User:home.html.twig', ['switcher' => $switcher, 'articles' => $articles, 'data' => $this->createStats(), 'journalUsers' => $journalUsers]);
        return $response;
    }