Profile domain

Profile Commands

AddProfileCommand

PrestaShop\PrestaShop\Core\Domain\Profile\Command\AddProfileCommand Adds new profile

Command details
Constructor parameters
  • $array $localizedNames
Handler class PrestaShop\PrestaShop\Adapter\Profile\CommandHandler\AddProfileHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Profile\CommandHandler\AddProfileHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\Profile\ValueObject\ProfileId

BulkDeleteProfileCommand

PrestaShop\PrestaShop\Core\Domain\Profile\Command\BulkDeleteProfileCommand Class BulkDeleteProfileCommand is a command to bulk delete profiles by given ids.

Command details
Constructor parameters
  • $array $profileIds
Handler class PrestaShop\PrestaShop\Adapter\Profile\CommandHandler\BulkDeleteProfileHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Profile\CommandHandler\BulkDeleteProfileHandlerInterface
Return type void

DeleteProfileCommand

PrestaShop\PrestaShop\Core\Domain\Profile\Command\DeleteProfileCommand Class DeleteProfileCommand is a command to delete profile by given id.

Command details
Constructor parameters
  • $int $profileId
Handler class PrestaShop\PrestaShop\Adapter\Profile\CommandHandler\DeleteProfileHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Profile\CommandHandler\DeleteProfileHandlerInterface
Return type void

EditProfileCommand

PrestaShop\PrestaShop\Core\Domain\Profile\Command\EditProfileCommand Edits existing Profile

Command details
Constructor parameters
  • $int $profileId
  • $array $localizedNames
Handler class PrestaShop\PrestaShop\Adapter\Profile\CommandHandler\EditProfileHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Profile\CommandHandler\EditProfileHandlerInterface
Return type void

UpdateModulePermissionsCommand

PrestaShop\PrestaShop\Core\Domain\Profile\Permission\Command\UpdateModulePermissionsCommand Updates module permissions for employee's profile

Command details
Constructor parameters
  • $int $profileId
  • $int $moduleId
  • $string $permission
  • $bool $isActive
Handler class PrestaShop\PrestaShop\Adapter\Profile\Permission\CommandHandler\UpdateModulePermissionsHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Profile\Permission\CommandHandler\UpdateModulePermissionsHandlerInterface
Return type void

UpdateTabPermissionsCommand

PrestaShop\PrestaShop\Core\Domain\Profile\Permission\Command\UpdateTabPermissionsCommand Updates tab permissions for employee's profile

Command details
Constructor parameters
  • $int $profileId
  • $int $tabId
  • $string $permission
  • $bool $isActive
Handler class PrestaShop\PrestaShop\Adapter\Profile\Permission\CommandHandler\UpdateTabPermissionsHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Profile\Permission\CommandHandler\UpdateTabPermissionsHandlerInterface
Return type void

Profile Queries

GetPermissionsForConfiguration

PrestaShop\PrestaShop\Core\Domain\Profile\Permission\Query\GetPermissionsForConfiguration Get profile permissons data for configuration

Query details
Constructor parameters
  • $int $employeeProfileId
Handler class PrestaShop\PrestaShop\Adapter\Profile\Permission\QueryHandler\GetPermissionsForConfigurationHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Profile\Permission\QueryHandler\GetPermissionsForConfigurationHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\Profile\Permission\QueryResult\ConfigurablePermissions

GetProfileForEditing

PrestaShop\PrestaShop\Core\Domain\Profile\Query\GetProfileForEditing Get Profile data for editing

Query details
Constructor parameters
  • $int $profileId
Handler class PrestaShop\PrestaShop\Adapter\Profile\QueryHandler\GetProfileForEditingHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Profile\QueryHandler\GetProfileForEditingHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\Profile\QueryResult\EditableProfile