RestApiArticleDetailUpdater

Extends

package

Default

Methods

Removes several custom Pickware article detail attribute fields from the passed `$postData`, if present, and returns the cleaned data.

removeCustomAttributesFromPostData(array $postData) : array

Arguments

$postData

array

Response

array

Removes the fields 'inStock' and 'stockMin' from the passed `$postData`, if present, and returns the cleaned data.

removeStockFieldsFromPostData(array $postData) : array

Arguments

$postData

array

Response

array

Checks the passed `$postData` for the `stockMin` field and, if present, initializes the stock limits of the passed `$articleDetail` to the respective value.

updateStockLimitsWithPostData(\Shopware\Models\Article\Detail $articleDetail, array $postData) 

Arguments

$articleDetail

\Shopware\Models\Article\Detail

$postData

array

Checks the passed `$postData` for the attribute `pickwareStockManagementDisabled` and, if set, either starts or stops managing the passed `$articleDetail`'s stock, depending on the value.

updateStockManagementStatusWithPostData(\Shopware\Models\Article\Detail $articleDetail, array $postData) 

Arguments

$articleDetail

\Shopware\Models\Article\Detail

$postData

array

Checks the passed `$postData` for the `inStock` field and, if present, updates the (physical) stock of the passed `$articleDetail` in accordance with the passed `inStock` value.

updateStockWithPostData(\Shopware\Models\Article\Detail $articleDetail, array $postData) 

Arguments

$articleDetail

\Shopware\Models\Article\Detail

$postData

array