Aimeos\Shop\Base\Support::getGroups PHP Method

getGroups() public method

public getGroups ( Aimeos\MShop\Context\Item\Iface $context )
$context Aimeos\MShop\Context\Item\Iface
    public function getGroups(\Aimeos\MShop\Context\Item\Iface $context)
    {
        $list = array();
        $manager = \Aimeos\MShop\Factory::createManager($context, 'customer/group');
        $search = $manager->createSearch();
        $search->setConditions($search->compare('==', 'customer.group.id', $context->getGroupIds()));
        foreach ($manager->searchItems($search) as $item) {
            $list[] = $item->getCode();
        }
        return $list;
    }