PHP Class Aimeos\Shop\Base\Support

Show file Open project: aimeos/aimeos-laravel

Public Methods

Method Description
__construct ( Context $context, Locale $locale ) Initializes the object
checkGroup ( string $userid, string | array $groupcodes ) : boolean Checks if the user with the given ID is in the specified group
getGroups ( Aimeos\MShop\Context\Item\Iface $context )

Method Details

__construct() public method

Initializes the object
public __construct ( Context $context, Locale $locale )
$context Context Context provider
$locale Locale Locale provider

checkGroup() public method

Checks if the user with the given ID is in the specified group
public checkGroup ( string $userid, string | array $groupcodes ) : boolean
$userid string Unique user ID
$groupcodes string | array Unique user/customer group codes that are allowed
return boolean True if user is part of the group, false if not

getGroups() public method

public getGroups ( Aimeos\MShop\Context\Item\Iface $context )
$context Aimeos\MShop\Context\Item\Iface