PrestaShop Developer Conference
PrestaShop Developer Conference
Paris, France - November 6, 2024
Let's talk code, commerce and open source.

Notice: You are browsing the documentation for PrestaShop 9, which is currently in development.

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

Feature domain

Feature Commands

AddFeatureCommand

PrestaShop\PrestaShop\Core\Domain\Feature\Command\AddFeatureCommand Adds new feature

Command details
Constructor parameters
  • $array $localizedNames
  • `$array $shopAssociation = array (
)`
Handler class PrestaShop\PrestaShop\Adapter\Feature\CommandHandler\AddFeatureHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Feature\CommandHandler\AddFeatureHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\Feature\ValueObject\FeatureId

AddFeatureValueCommand

PrestaShop\PrestaShop\Core\Domain\Feature\Command\AddFeatureValueCommand Class AddFeatureValueCommand is used to add predefined feature values (as opposed to custom values which are only assigned to a Specific product)

Command details
Constructor parameters
  • $int $featureId
  • $array $localizedValues
Handler class PrestaShop\PrestaShop\Adapter\Feature\CommandHandler\AddFeatureValueHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Feature\CommandHandler\AddFeatureValueHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\Feature\ValueObject\FeatureValueId

EditFeatureCommand

PrestaShop\PrestaShop\Core\Domain\Feature\Command\EditFeatureCommand Edit feature with given data.

Command details
Constructor parameters
  • $int $featureId
Handler class PrestaShop\PrestaShop\Adapter\Feature\CommandHandler\EditFeatureHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Feature\CommandHandler\EditFeatureHandlerInterface
Return type void

EditFeatureValueCommand

PrestaShop\PrestaShop\Core\Domain\Feature\Command\EditFeatureValueCommand Class EditFeatureValueCommand is used to edit FeatureValue content

Command details
Constructor parameters
  • $int $featureValueId
Handler class PrestaShop\PrestaShop\Adapter\Feature\CommandHandler\EditFeatureValueHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Feature\CommandHandler\EditFeatureValueHandlerInterface
Return type void

Feature Queries

GetFeatureForEditing

PrestaShop\PrestaShop\Core\Domain\Feature\Query\GetFeatureForEditing Retrieves feature data for editing

Query details
Constructor parameters
  • $int $featureId
Handler class PrestaShop\PrestaShop\Adapter\Feature\QueryHandler\GetFeatureForEditingHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Feature\QueryHandler\GetFeatureForEditingHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\Feature\QueryResult\EditableFeature

GetFeatureValueForEditing

PrestaShop\PrestaShop\Core\Domain\Feature\Query\GetFeatureValueForEditing Retrieves feature value data for editing

Query details
Constructor parameters
  • $int $featureValueId
Handler class PrestaShop\PrestaShop\Adapter\Feature\QueryHandler\GetFeatureValueForEditingHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Feature\QueryHandler\GetFeatureValueForEditingHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\Feature\QueryResult\EditableFeatureValue