Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- For example: I have OrderController and there is action Open which show data about order. There is three groups of user - admin, user and quest. Each of them have another layout and little bit application logic.
- Which is better?
- 1 : Create for example 3 actions like : adminOpenAction, userOpenAction, questOpenAction which every store only small piece of code and url will be very descriptive and can use ACL for authentazition becouse only specific use can access this action.
- 2 : Create one action which store whole logic - openAction and three view files - admin-open,user-open,quest-open. There will be only one action bat there must be whole logic in if and else structure and also validation for unauthorized access.
- 3 : Same as 2 bat create only one view which is really messy...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement