RegionServiceInterface
RegionServiceInterface.php
:
19
The region service is used to manage regions in the context of storefront.
Tags
Methods¶
getAvailableRegions() ¶
RegionServiceInterface.php
:
26
Returns list of the regions assigned to the storefront.
|
|
Return values
iterable<string|int, RegionInterface>
getSessionRegion() ¶
RegionServiceInterface.php
:
35
Get the region used in the current user session (or null if not set).
|
|
Region stored in the session is usually manually selected by user and has higher priority than "default" region.
Return values
RegionInterface|null
Tags
isAcceptable() ¶
RegionServiceInterface.php
:
47
Checks if the region can be used in the current storefront.
|
|
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$region | RegionInterface | - | - |
Return values
bool
setSessionRegion() ¶
RegionServiceInterface.php
:
42
Sets the region to be used for a current user session.
|
|
Region stored in the session is usually manually selected by user and has higher priority than "default" region.
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$region | RegionInterface|null | - | - |