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.

Employee domain

Employee Commands

AddEmployeeCommand

PrestaShop\PrestaShop\Core\Domain\Employee\Command\AddEmployeeCommand Adds new employee with given data

Command details
Constructor parameters
  • $string $firstName
  • $string $lastName
  • $string $email
  • $string $plainPassword
  • $int $defaultPageId
  • $int $languageId
  • $bool $active
  • $int $profileId
  • $array $shopAssociation
  • $bool $hasEnabledGravatar = false
Handler class PrestaShop\PrestaShop\Adapter\Profile\Employee\CommandHandler\AddEmployeeHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Employee\CommandHandler\AddEmployeeHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\Employee\ValueObject\EmployeeId

BulkDeleteEmployeeCommand

PrestaShop\PrestaShop\Core\Domain\Employee\Command\BulkDeleteEmployeeCommand Class BulkDeleteEmployeeCommand.

Command details
Constructor parameters
  • $array $employeeIds
Handler class PrestaShop\PrestaShop\Adapter\Profile\Employee\CommandHandler\BulkDeleteEmployeeHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Employee\CommandHandler\BulkDeleteEmployeeHandlerInterface
Return type void

BulkUpdateEmployeeStatusCommand

PrestaShop\PrestaShop\Core\Domain\Employee\Command\BulkUpdateEmployeeStatusCommand Class UpdateEmployeesStatusCommand updates employees status.

Command details
Constructor parameters
  • $array $employeeIds
  • $bool $status
Handler class PrestaShop\PrestaShop\Adapter\Profile\Employee\CommandHandler\BulkUpdateEmployeeStatusHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Employee\CommandHandler\BulkUpdateEmployeeStatusHandlerInterface
Return type void

DeleteEmployeeCommand

PrestaShop\PrestaShop\Core\Domain\Employee\Command\DeleteEmployeeCommand Class DeleteEmployeeCommand deletes given employee.

Command details
Constructor parameters
  • $int $employeeId
Handler class PrestaShop\PrestaShop\Adapter\Profile\Employee\CommandHandler\DeleteEmployeeHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Employee\CommandHandler\DeleteEmployeeHandlerInterface
Return type void

EditEmployeeCommand

PrestaShop\PrestaShop\Core\Domain\Employee\Command\EditEmployeeCommand Edit employee with given data.

Command details
Constructor parameters
  • $int $employeeId
Handler class PrestaShop\PrestaShop\Adapter\Profile\Employee\CommandHandler\EditEmployeeHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Employee\CommandHandler\EditEmployeeHandlerInterface
Return type void

ToggleEmployeeStatusCommand

PrestaShop\PrestaShop\Core\Domain\Employee\Command\ToggleEmployeeStatusCommand Class ToggleEmployeeStatusCommand.

Command details
Constructor parameters
  • $int $employeeId
Handler class PrestaShop\PrestaShop\Adapter\Profile\Employee\CommandHandler\ToggleEmployeeStatusHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Employee\CommandHandler\ToggleEmployeeStatusHandlerInterface
Return type void

Employee Queries

GetEmployeeEmailById

PrestaShop\PrestaShop\Core\Domain\Employee\Query\GetEmployeeEmailById __

Query details
Constructor parameters
  • $int $employeeId
Handler class PrestaShop\PrestaShop\Adapter\Profile\Employee\QueryHandler\GetEmployeeEmailByIdHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Employee\QueryHandler\GetEmployeeEmailByIdHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\ValueObject\Email

GetEmployeeForEditing

PrestaShop\PrestaShop\Core\Domain\Employee\Query\GetEmployeeForEditing Gets employee information for editing.

Query details
Constructor parameters
  • $int $employeeId
Handler class PrestaShop\PrestaShop\Adapter\Profile\Employee\QueryHandler\GetEmployeeForEditingHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Employee\QueryHandler\GetEmployeeForEditingHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\Employee\QueryResult\EditableEmployee