1 | <?php |
||
19 | class Support |
||
20 | { |
||
21 | /** |
||
22 | * @var \Aimeos\Shop\Base\Context |
||
23 | */ |
||
24 | private $context; |
||
25 | |||
26 | |||
27 | /** |
||
28 | * Initializes the object |
||
29 | * |
||
30 | * @param \Aimeos\Shop\Base\Context $context Context object |
||
31 | */ |
||
32 | public function __construct( \Aimeos\Shop\Base\Context $context ) |
||
36 | |||
37 | |||
38 | /** |
||
39 | * Checks if the user with the given ID is in the specified group |
||
40 | * |
||
41 | * @param string $userid Unique user ID |
||
42 | * @param string|array $groupcodes Unique user/customer group codes that are allowed |
||
43 | * @return boolean True if user is part of the group, false if not |
||
44 | */ |
||
45 | public function checkGroup( $userid, $groupcodes ) |
||
61 | |||
62 | |||
63 | /** |
||
64 | * Returns the groups items for the given codes |
||
65 | * |
||
66 | * @param array $codes List of group codes |
||
67 | * @return array Associative list of group IDs as keys and \Aimeos\MShop\Customer\Item\Group\Iface as values |
||
68 | */ |
||
69 | protected function getGroups( array $codes ) |
||
78 | } |