1<?php
2
3/* Copyright (c) 2016 Timon Amstutz <timon.amstutz@ilub.unibe.ch> Extended GPL, see docs/LICENSE */
4
5namespace ILIAS\UI\Component\Deck;
6
7interface Deck extends \ILIAS\UI\Component\Component
8{
9    /**
10     * Different sizes of the card. Those values will be returned by getCardsSize.
11     */
12    const SIZE_XS = 1; //12 Cards per row on normal screen, 6 cards on small screens, 1 card on very small screens.
13    const SIZE_S = 2; //6 Cards per row, 3 cards on small screens, 1 card on very small screens
14    const SIZE_M = 3; //4 Cards per row,
15    const SIZE_L = 4; //3 Cards per row
16    const SIZE_XL = 6; //2 Cards per row
17    const SIZE_FULL = 12; //1 Card per row
18
19    /**
20     * Set the cards to be displayed in the deck
21     * @param \ILIAS\UI\Component\Card\Card[] $cards
22     * @return Deck
23     */
24    public function withCards($cards);
25
26    /***
27     * Get the cards to be displayed in the deck
28     * @return \ILIAS\UI\Component\Card\Card[]
29     */
30    public function getCards();
31
32    /**
33     * Set the cards size to extra small:
34     *  - 12 Cards on normal screens
35     *  - 6 Cards on small screens
36     *  - 1 Card on very small screens
37     *
38     * @param int Size of the card
39     * @return Deck
40     */
41    public function withExtraSmallCardsSize();
42
43    /**
44     * Set the cards size to small:
45     *  - 6 Cards on normal screens
46     *  - 3 Cards on small screens
47     *  - 1 Card on very small screens
48     *
49     * @param int Size of the card
50     * @return Deck
51     */
52    public function withSmallCardsSize();
53
54    /**
55     * Set the cards size to normal:
56     *  - 4 Cards on normal screens
57     *  - 2 Cards on small screens
58     *  - 1 Card on very small screens
59     *
60     * @param int Size of the card
61     * @return Deck
62     */
63    public function withNormalCardsSize();
64
65    /**
66     * Set the cards size to large:
67     *  - 3 Cards on normal screens
68     *  - 1 Cards on small screens
69     *  - 1 Card on very small screens
70     *
71     * @param int Size of the card
72     * @return Deck
73     */
74    public function withLargeCardsSize();
75
76    /**
77     * Set the cards size to extra large:
78     *  - 2 Cards on normal screens
79     *  - 1 Cards on small screens
80     *  - 1 Card on very small screens
81     *
82     * @param int Size of the card
83     * @return Deck
84     */
85    public function withExtraLargeCardsSize();
86
87    /**
88     * Set the cards size to full:
89     *  - 1 Cards on normal screens
90     *  - 1 Cards on small screens
91     *  - 1 Card on very small screens
92     *
93     * @param int Size of the card
94     * @return Deck
95     */
96    public function withFullSizedCardsSize();
97
98    /**
99     * Get the cards size. Note that this size tells how much space the card is using.
100     * The number of cards displayed by normal screen size is 12/size.
101     *
102     * @return int
103     */
104    public function getCardsSize();
105}
106