Download presentation
Presentation is loading. Please wait.
Published byZackary Munday Modified over 9 years ago
1
Symfony2 - Step-by-step Week 3 ◦ UserBundle ◦ Authentication ◦ Authorization ◦ Events ◦ Services
2
Week 3 – Symfony 2 Advanced Purpose: blog application Requirements: 1.User management 2.Authorization 3.Authentication 4.Services 5.Events
3
1 – UserBundle Requirements: ◦ Add LikipeUserBundle ◦ Add User entity ◦ Add C.R.U.D. for User Tutorial: http://symfony.com/doc/current/book/doc trine.html http://symfony.com/doc/current/book/doc trine.html
4
2 – Authentication Requirements: ◦ Login/logout with User entity ◦ UserProvider Tutorial: http://symfony.com/doc/current/cookbook/se curity/entity_provider.html http://symfony.com/doc/current/cookbook/se curity/entity_provider.html Achievement: ◦ UserInterface Note: ◦ Password need to be encoded
5
3 – Authorization Requirements: ◦ Only ROLE_USER can see routes from LikipeBlogBundle ◦ Only ROLE_ADMIN can see routes from LikipeUserBundle Tutorial: http://symfony.com/doc/current/cookbook/security/en tity_provider.html#authenticating-someone-against-a- database http://symfony.com/doc/current/cookbook/security/en tity_provider.html#authenticating-someone-against-a- database Achievement: ◦ User’s roles ◦ Access control by Role Note: ◦ Must use security.yml configuration
6
3 – Services Requirements: ◦ Create a service “likipe_log” (in LikipeBlogBundle) ◦ “likipe_log” will save messages in /web/likipe.log file Tutorial: http://symfony.com/doc/current/book/service_co ntainer.html http://symfony.com/doc/current/book/service_co ntainer.html Achievement: ◦ Service configuration ◦ Service terminology Note: ◦ Must use “bundle” service.yml configuration
7
4 – Events Requirements: ◦ Auto-add “created” for entities before persits ◦ Page hits for blog page. Tutorial: ◦ http://symfony.com/doc/current/cookbook/doctri ne/event_listeners_subscribers.html http://symfony.com/doc/current/cookbook/doctri ne/event_listeners_subscribers.html ◦ http://symfony.com/doc/current/components/even t_dispatcher/introduction.html http://symfony.com/doc/current/components/even t_dispatcher/introduction.html Achievement: ◦ Listener on Doctrine ◦ Listener on Kernel
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.