src/AppBundle/Controller/Classroom/AnnouncementController.php
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
namespace AppBundle\Controller\Classroom;
use AppBundle\Controller\BaseController;
use Biz\Classroom\Service\ClassroomService;
use Biz\Announcement\Service\AnnouncementService;
class AnnouncementController extends BaseController
{
public function createAction($targetId)
{
$this->getClassroomService()->tryManageClassroom($targetId);
$classroom = $this->getClassroomService()->getClassroom($targetId);
return $this->render('announcement/announcement-write-modal.html.twig', array(
'announcement' => array('id' => '', 'content' => ''),
'targetObject' => $classroom,
'targetType' => 'classroom',
'targetId' => $targetId,
));
}
public function editAction($targetId, $announcementId)
{
$this->getClassroomService()->tryManageClassroom($targetId);
$classroom = $this->getClassroomService()->getClassroom($targetId);
$announcement = $this->getAnnouncementService()->getAnnouncement($announcementId);
return $this->render('announcement/announcement-write-modal.html.twig', array(
'announcement' => $announcement,
'targetObject' => $classroom,
'targetType' => 'classroom',
'targetId' => $targetId,
));
}
public function listAction($targetId)
{
$this->getClassroomService()->tryManageClassroom($targetId);
$classroom = $this->getClassroomService()->getClassroom($targetId);
$conditions = array(
'targetType' => 'classroom',
'targetId' => $classroom['id'],
);
$announcements = $this->getAnnouncementService()->searchAnnouncements($conditions, array('createdTime' => 'DESC'), 0, 10);
return $this->render('announcement/announcement-list-modal.html.twig', array(
'announcements' => $announcements,
'targetType' => 'classroom',
'targetId' => $classroom['id'],
'canManage' => true,
));
}
/**
* @return ClassroomService
*/
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。