@@ 17-43 (lines=27) @@ | ||
14 | /** |
|
15 | * @author Beñat Espiña <[email protected]> |
|
16 | */ |
|
17 | class RemoveMenuTranslationCommand |
|
18 | { |
|
19 | private $menuId; |
|
20 | private $locale; |
|
21 | ||
22 | public function __construct($menuId, $locale) |
|
23 | { |
|
24 | if (null === $menuId) { |
|
25 | throw new \InvalidArgumentException('The menu id cannot be null'); |
|
26 | } |
|
27 | if (null === $locale) { |
|
28 | throw new \InvalidArgumentException('The locale cannot be null'); |
|
29 | } |
|
30 | $this->menuId = $menuId; |
|
31 | $this->locale = $locale; |
|
32 | } |
|
33 | ||
34 | public function menuId() |
|
35 | { |
|
36 | return $this->menuId; |
|
37 | } |
|
38 | ||
39 | public function locale() |
|
40 | { |
|
41 | return $this->locale; |
|
42 | } |
|
43 | } |
|
44 |
@@ 17-43 (lines=27) @@ | ||
14 | /** |
|
15 | * @author Beñat Espiña <[email protected]> |
|
16 | */ |
|
17 | class TranslatableOfIdQuery |
|
18 | { |
|
19 | private $translatableId; |
|
20 | private $locale; |
|
21 | ||
22 | public function __construct($translatableId, $locale) |
|
23 | { |
|
24 | if (null === $translatableId) { |
|
25 | throw new \InvalidArgumentException('The translatableId cannot be null'); |
|
26 | } |
|
27 | if (null === $locale) { |
|
28 | throw new \InvalidArgumentException('The locale cannot be null'); |
|
29 | } |
|
30 | $this->translatableId = $translatableId; |
|
31 | $this->locale = $locale; |
|
32 | } |
|
33 | ||
34 | public function translatableId() |
|
35 | { |
|
36 | return $this->translatableId; |
|
37 | } |
|
38 | ||
39 | public function locale() |
|
40 | { |
|
41 | return $this->locale; |
|
42 | } |
|
43 | } |
|
44 |