Skip to content

Instantly share code, notes, and snippets.

@plobacher
Created August 26, 2015 07:15
Show Gist options
  • Save plobacher/e0c5aa69bd3d3d0f0d70 to your computer and use it in GitHub Desktop.
Save plobacher/e0c5aa69bd3d3d0f0d70 to your computer and use it in GitHub Desktop.
- Erlaubnis: ext_localconf.php
- Status Quo: Blog->show
- Blog->show: Liste der Posts (=> Button für Post DEL, SHOW, EDIT)
- Bei Links darauf achten, dass der Blog UND der Post übergeben werden (Post->show, Post->updateForm, Post->deleteConfirm)
- Post->show: PostController gibt es eine Methode showAction($blog,$post) - und darin zwei assign()
- Post/Show.html (Template) und Link zurück zum Blog->show($blog)
- Post->updateForm: PostController gibt es eine Methode updateFormAction($blog,$post),- und darin zwei assign()
- Post/UpdateForm.html: render partial "Post/Form" (wichtig: Post und Blog als Arguments!)
- Post->update: postRepository->update($post)
- Post->deleteConfirm: PostController gibt es eine Methode deleteConfirmAction($blog,$post),- und darin zwei assign()
- Post/DeleteConfirm.html: Bei "Nein" zurück zum Blog->Show, bei "Ja" weiter zu Post->delete
- Post->delete: postRepository->remove($post)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment