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.

Attachment domain

Attachment Commands

AddAttachmentCommand

PrestaShop\PrestaShop\Core\Domain\Attachment\Command\AddAttachmentCommand Attachment creation command

Command details
Constructor parameters
  • $array $localizedNames
  • $array $localizedDescriptions
Handler class PrestaShop\PrestaShop\Adapter\Attachment\CommandHandler\AddAttachmentHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Attachment\CommandHandler\AddAttachmentHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\Attachment\ValueObject\AttachmentId

BulkDeleteAttachmentsCommand

PrestaShop\PrestaShop\Core\Domain\Attachment\Command\BulkDeleteAttachmentsCommand Bulk delete attachment command is responsible for deleting Attachment

Command details
Constructor parameters
  • $array $attachmentIds
Handler class PrestaShop\PrestaShop\Adapter\Attachment\CommandHandler\BulkDeleteAttachmentsHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Attachment\CommandHandler\BulkDeleteAttachmentsHandlerInterface
Return type void

DeleteAttachmentCommand

PrestaShop\PrestaShop\Core\Domain\Attachment\Command\DeleteAttachmentCommand Delete attachment command is responsible for deleting Attachment

Command details
Constructor parameters
  • $int $attachmentId
Handler class PrestaShop\PrestaShop\Adapter\Attachment\CommandHandler\DeleteAttachmentHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Attachment\CommandHandler\DeleteAttachmentHandlerInterface
Return type void

EditAttachmentCommand

PrestaShop\PrestaShop\Core\Domain\Attachment\Command\EditAttachmentCommand Attachment editing command

Command details
Constructor parameters
  • $PrestaShop\PrestaShop\Core\Domain\Attachment\ValueObject\AttachmentId $attachmentId
Handler class PrestaShop\PrestaShop\Adapter\Attachment\CommandHandler\EditAttachmentHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Attachment\CommandHandler\EditAttachmentHandlerInterface
Return type void

Attachment Queries

GetAttachmentForEditing

PrestaShop\PrestaShop\Core\Domain\Attachment\Query\GetAttachmentForEditing Gets attachment information for editing.

Query details
Constructor parameters
  • $int $attachmentIdValue
Handler class PrestaShop\PrestaShop\Adapter\Attachment\QueryHandler\GetAttachmentForEditingHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Attachment\QueryHandler\GetAttachmentForEditingHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\Attachment\QueryResult\EditableAttachment

GetAttachment

PrestaShop\PrestaShop\Core\Domain\Attachment\Query\GetAttachment Get attachment query

Query details
Constructor parameters
  • $int $attachmentId
Handler class PrestaShop\PrestaShop\Adapter\Attachment\QueryHandler\GetAttachmentHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Attachment\QueryHandler\GetAttachmentHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\Attachment\QueryResult\Attachment

GetAttachmentInformationList

PrestaShop\PrestaShop\Core\Domain\Attachment\Query\GetAttachmentInformationList Query providing attachments information

Query details
Constructor parameters
  • $int $languageId
Handler class PrestaShop\PrestaShop\Adapter\Attachment\QueryHandler\GetAttachmentInformationListHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Attachment\QueryHandler\GetAttachmentsForListingHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\Attachment\QueryResult\AttachmentInformation[]