src/Topxia/MobileBundleV2/Controller/TeacherAppController.php

(开头部分) 1019B

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<?php

namespace Topxia\MobileBundleV2\Controller;

use Symfony\Component\HttpFoundation\Request;
use AppBundle\Common\ArrayToolkit;

class TeacherAppController extends MobileBaseController
{
    public function indexAction()
    {
        $conditions = array(
            'roles' => 'ROLE_TEACHER',
            'locked' => 0,
        );

        // $paginator = new Paginator(
        //     $this->get('request'),
        //     $this->getUserService()->countUsers($conditions),
        //     20
        // );

        $teachers = $this->getUserService()->searchUsers(
            $conditions,
            array('promotedTime', 'DESC'),
            0,
            10
        );

        $teachers = $this->filterUsers($teachers);

        $profiles = $this->getUserService()->findUserProfilesByIds(ArrayToolkit::column($teachers, 'id'));

        return $this->render('TopxiaMobileBundleV2:Teacher:list.html.twig', array(
            'teachers' => $teachers,
            'profiles' => $profiles,
        ));
    }
}

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。