1 | <?php |
||
22 | class DefaultController extends Controller |
||
23 | { |
||
24 | /** |
||
25 | * <p>Shows preview of the first n cards, with the options to load more cards (the next n cards).</p> |
||
26 | * <p>Each card is displayed as a thumbnail. Clicking the thumbnail, will expand the card to show all of it |
||
27 | * details.</p> |
||
28 | * <p>There is also, a search text field at the top right side to search the cards.</p> |
||
29 | * |
||
30 | * @ApiDoc( |
||
31 | * section="Public pages", |
||
32 | * resource=true, |
||
33 | * description="The home page." |
||
34 | * ) |
||
35 | * |
||
36 | * @return \Symfony\Component\HttpFoundation\Response A Response instance |
||
37 | */ |
||
38 | public function indexAction() |
||
51 | |||
52 | /** |
||
53 | * Shows the details of a card. |
||
54 | * |
||
55 | * @ApiDoc( |
||
56 | * section="Public pages", |
||
57 | * resource=true, |
||
58 | * description="Displays a card details.", |
||
59 | * statusCodes={ |
||
60 | * 200="Returned when successful", |
||
61 | * 404="Returned when the card is not found" |
||
62 | * } |
||
63 | * ) |
||
64 | * |
||
65 | * @param string $slug The slug value of a card. |
||
66 | * |
||
67 | * @return \Symfony\Component\HttpFoundation\Response A Response instance |
||
68 | */ |
||
69 | public function viewAction($slug) |
||
83 | |||
84 | /** |
||
85 | * Update flashcard view counter |
||
86 | * |
||
87 | * @param \Moo\FlashCardBundle\Entity\Card $card |
||
88 | * @param \Moo\FlashCardBundle\Repository\Card $cardService |
||
89 | * |
||
90 | * @return \Moo\FlashCardBundle\Entity\Card |
||
91 | */ |
||
92 | protected function updateViews($card, $cardService) |
||
104 | } |
||
105 |