Creating a Calendar in Symfony

纵饮孤独 提交于 2019-12-04 20:01:17

I would suggest to build 2 applications for that.

  1. frontend (read/see)
  2. backend (admin)

Just go with the normal symfony approach.. define your models, generate frontend (inkl. modules). There you can adjust you templates and css.

Practicle open book where you can choose the topics you need

Then use the admin-generator to get the backend application. You can customize behaviours and styling of course.

I recommend FullCalendar jQuery plugin. It gives you very nice JavaScript calendar with drag&drop support. You can use your own CSS style.

On the server side create symfony actions that will return data to FullCalendar API. Just serialize the data to JSON Event Object.

Of course you should use symfony security component to restrict read/write access. Show only those events that users should be able to see. And don't let them access write actions if they don't have write permission.

To manage event data you can either create backend admin module or display your own form when user click on calendar (like Google Calendar does). If you like the second approach then you have to handle it in JavaScript.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!