1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- <?php
-
- namespace Muzich\CoreBundle\Controller;
-
- use Muzich\CoreBundle\lib\Controller;
- use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
- use Symfony\Component\HttpFoundation\Response;
- use Symfony\Component\HttpKernel\Exception\HttpException;
-
- class InfoController extends Controller
- {
-
-
- /**
- *
- * @Template()
- */
- public function aboutAction()
- {
- return array();
- }
-
- /**
- *
- * @Template()
- */
- public function developmentAction()
- {
- return array();
- }
-
- /**
- *
- * @Template()
- */
- public function sitesAction()
- {
- return array();
- }
-
- public function teapotAction()
- {
- throw new HttpException(418, "I'm a teapot !");
- }
-
- /**
- *
- * @Template()
- */
- public function cguAction()
- {
- return array();
- }
-
- public function helpboxAction($ressource_id)
- {
- if (!in_array($ressource_id, array(
- 'element_add_url',
- 'tags_prompt',
- 'know_more'
- )))
- {
- return $this->jsonNotFoundResponse();
- }
-
- return $this->jsonResponse(array(
- 'status' => 'success',
- 'data' => $this->render('MuzichCoreBundle:Helpbox:'.$ressource_id.'.html.twig')
- ->getContent()
- ));
- }
-
- public function testErrorAction($code)
- {
- if (!in_array($code, array('404', '403', '')))
- {
- throw new HttpException(404);
- }
-
- return $this->render('TwigBundle:Exception:error'.$code.'.html.twig');
- }
-
- }
|