1 | <?php |
||
16 | class BasketElement |
||
17 | { |
||
18 | /** |
||
19 | * @param \stdClass[] $values |
||
20 | * @return BasketElement[] |
||
21 | */ |
||
22 | 1 | public static function fromList(array $values) |
|
32 | |||
33 | /** |
||
34 | * @param \stdClass $value |
||
35 | * @return BasketElement |
||
36 | */ |
||
37 | 1 | public static function fromValue(\stdClass $value) |
|
41 | |||
42 | /** |
||
43 | * @var \stdClass |
||
44 | */ |
||
45 | protected $source; |
||
46 | |||
47 | /** |
||
48 | * @var Record |
||
49 | */ |
||
50 | protected $record; |
||
51 | |||
52 | /** |
||
53 | * @var ArrayCollection|BasketValidationChoice[] |
||
54 | */ |
||
55 | protected $validationChoices; |
||
56 | |||
57 | /** |
||
58 | * @param \stdClass $source |
||
59 | */ |
||
60 | 1 | public function __construct(\stdClass $source) |
|
64 | |||
65 | /** |
||
66 | * @return \stdClass |
||
67 | */ |
||
68 | public function getRawData() |
||
72 | |||
73 | /** |
||
74 | * The id of the element |
||
75 | * |
||
76 | * @return integer |
||
77 | */ |
||
78 | 1 | public function getId() |
|
82 | |||
83 | /** |
||
84 | * Position of the element in the basket |
||
85 | * |
||
86 | * @return integer |
||
87 | */ |
||
88 | 1 | public function getOrder() |
|
92 | |||
93 | /** |
||
94 | * Tell whether the basket item is a validation item |
||
95 | * |
||
96 | * @return bool |
||
97 | */ |
||
98 | 1 | public function isValidationItem() |
|
102 | |||
103 | /** |
||
104 | * Get the record associated to the basket item |
||
105 | * |
||
106 | * @return Record |
||
107 | */ |
||
108 | 1 | public function getRecord() |
|
112 | |||
113 | /** |
||
114 | * Retrieve the choice of all participants that concern the basket element |
||
115 | * in a collection PhraseanetSDK\Entity\BasketValidationChoice object |
||
116 | * |
||
117 | * @return ArrayCollection |
||
118 | */ |
||
119 | 1 | public function getValidationChoices() |
|
129 | |||
130 | /** |
||
131 | * Get the annotation about the validation of the current authenticated user |
||
132 | * |
||
133 | * @return int |
||
134 | */ |
||
135 | 1 | public function getNote() |
|
139 | |||
140 | /** |
||
141 | * Get the agreement of the currently authenticated user |
||
142 | * |
||
143 | * - null : no response yet |
||
144 | * - true : accepted |
||
145 | * - false: rejected |
||
146 | * |
||
147 | * @return null|boolean |
||
148 | */ |
||
149 | 1 | public function getAgreement() |
|
153 | } |
||
154 |