1 | <?php |
||
11 | class SimpleOrderValidator extends AbstractValidator |
||
12 | { |
||
13 | /** |
||
14 | * @var Product |
||
15 | */ |
||
16 | private $defaultService; |
||
17 | |||
18 | /** |
||
19 | * @inheritDoc |
||
20 | */ |
||
21 | public function __construct(Translate $langs, DoliDB $db, $defaultServiceId) |
||
26 | |||
27 | /** |
||
28 | * @param $defaultServiceId |
||
29 | */ |
||
30 | private function fetchService($defaultServiceId) |
||
35 | |||
36 | /** |
||
37 | * Get a value as input and validates it. If an error occurs, it returns error messages. |
||
38 | * |
||
39 | * @param stdClass $value |
||
40 | * @param array $context |
||
41 | * |
||
42 | * @return bool |
||
43 | */ |
||
44 | public function isValid($value, $context = []) |
||
70 | |||
71 | /** |
||
72 | * Returns the minimum price. |
||
73 | * |
||
74 | * @return int |
||
75 | */ |
||
76 | private function getMinPrice() |
||
83 | } |