Warning: You are browsing the documentation for PrestaShop 1.7, which is outdated.

You might want to read an updated version of this page for the current version, PrestaShop 8. Read the updated version of this page

Learn how to upgrade to the latest version.

Zone domain

Zone Commands

AddZoneCommand

PrestaShop\PrestaShop\Core\Domain\Zone\Command\AddZoneCommand Adds new zone with provided data.

Command details
Constructor parameters
  • $string $name
  • $bool $enabled
  • $array $shopAssociation
Handler class PrestaShop\PrestaShop\Adapter\Zone\CommandHandler\AddZoneHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Zone\CommandHandler\AddZoneHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\Zone\ValueObject\ZoneId

BulkDeleteZoneCommand

PrestaShop\PrestaShop\Core\Domain\Zone\Command\BulkDeleteZoneCommand Deletes zones on bulk action

Command details
Constructor parameters
  • $array $zoneIds
Handler class PrestaShop\PrestaShop\Adapter\Zone\CommandHandler\BulkDeleteZoneHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Zone\CommandHandler\BulkDeleteZoneHandlerInterface
Return type void

BulkToggleZoneStatusCommand

PrestaShop\PrestaShop\Core\Domain\Zone\Command\BulkToggleZoneStatusCommand Toggles zones status on bulk action

Command details
Constructor parameters
  • $bool $expectedStatus
  • $array $zoneIds
Handler class PrestaShop\PrestaShop\Adapter\Zone\CommandHandler\BulkToggleZoneStatusHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Zone\CommandHandler\BulkToggleZoneStatusHandlerInterface
Return type void

DeleteZoneCommand

PrestaShop\PrestaShop\Core\Domain\Zone\Command\DeleteZoneCommand Deletes zone

Command details
Constructor parameters
  • $int $zoneId
Handler class PrestaShop\PrestaShop\Adapter\Zone\CommandHandler\DeleteZoneHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Zone\CommandHandler\DeleteZoneHandlerInterface
Return type void

EditZoneCommand

PrestaShop\PrestaShop\Core\Domain\Zone\Command\EditZoneCommand Command that edits zone

Command details
Constructor parameters
  • $int $zoneId
Handler class PrestaShop\PrestaShop\Adapter\Zone\CommandHandler\EditZoneHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Zone\CommandHandler\EditZoneHandlerInterface
Return type void

ToggleZoneStatusCommand

PrestaShop\PrestaShop\Core\Domain\Zone\Command\ToggleZoneStatusCommand Class ToggleZoneStatusCommand is responsible for toggling zone status

Command details
Constructor parameters
  • $int $zoneId
Handler class PrestaShop\PrestaShop\Adapter\Zone\CommandHandler\ToggleZoneStatusHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Zone\CommandHandler\ToggleZoneStatusHandlerInterface
Return type void

Zone Queries

GetZoneForEditing

PrestaShop\PrestaShop\Core\Domain\Zone\Query\GetZoneForEditing Gets zone for editing in back office

Query details
Constructor parameters
  • $int $zoneId
Handler class PrestaShop\PrestaShop\Adapter\Zone\QueryHandler\GetZoneForEditingHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Zone\QueryHandler\GetZoneForEditingHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\Zone\QueryResult\EditableZone