Example #1
0
 public function startBellAction()
 {
     $ec = new \Justsy\OpenAPIBundle\Controller\ApiController();
     $type = $this->getRequest()->get('type');
     $ec->setContainer($this->container);
     $re = $ec->timerRemindTaskAction()->getContent();
     if (json_decode($re)->s == '1') {
         $res = new Response(json_encode(array('s' => 1, 'message' => '', '_type' => $type)));
         $res->headers->set('Content-Type', 'text/json');
         return $res;
     } else {
         $res = new Response(json_encode(array('s' => 0, 'message' => "提醒未设置成功。<a href=''>重试</a>")));
         $res->headers->set('Content-Type', 'text/json');
         return $res;
     }
 }