16 use Symfony\Component\HttpFoundation\Request;
17 use Symfony\Component\HttpFoundation\Response;
18 use Symfony\Component\HttpFoundation\Session\Session;
22 const NAME =
"kotoba-history";
28 function __construct()
30 parent::__construct(self::NAME, array(
34 $this->uploadDao = $this->
getObject(
'dao.upload');
35 $this->clearingDao = $this->
getObject(
'dao.clearing');
42 protected function handle(Request $request)
44 $uploadId = intval($request->get(
'upload'));
45 if (empty($uploadId)) {
46 return new Response(
'Missing upload parameter', Response::HTTP_BAD_REQUEST);
48 $uploadTreeId = intval($request->get(
'item'));
49 if (empty($uploadTreeId)) {
50 return new Response(
'Missing item parameter', Response::HTTP_BAD_REQUEST);
52 $onlyTried = !$request->get(
'all');
54 $uploadTreeTableName = $this->uploadDao->getUploadtreeTableName($uploadId);
56 $itemTreeBounds = $this->uploadDao->getItemTreeBounds($uploadTreeId, $uploadTreeTableName);
60 $kotobaHistory = $this->clearingDao->getKotobaHistory($itemTreeBounds, $groupId, $onlyTried);
61 return $this->
render(
"kotoba-history.html.twig",$this->mergeWithDefault(array(
'kotobaHistory'=>$kotobaHistory)));
Contains the constants and helpers for authentication of user.
render($templateName, $vars=null, $headers=null)