ProductUpdateService
in package
Table of Contents
Properties
- $auth : AuthComponent
- $countryRepository : CountryRepository
- $countryVatTypeRepository : CountryVatTypeRepository
- $currencyRepository : CurrencyRepository
- $productRepository : ProductRepository
- $productService : ProductService
- $request : Request
- $vatTypeRepository : VatTypeRepository
Methods
- __construct() : mixed
- updateProduct() : array<string|int, mixed>
- Update product by productId
- updateProductByUserAndProduct() : mixed
- getFormMeta() : stdClass
Properties
$auth
private
AuthComponent
$auth
$countryRepository
private
CountryRepository
$countryRepository
$countryVatTypeRepository
private
CountryVatTypeRepository
$countryVatTypeRepository
$currencyRepository
private
CurrencyRepository
$currencyRepository
$productRepository
private
ProductRepository
$productRepository
$productService
private
ProductService
$productService
$request
private
Request
$request
$vatTypeRepository
private
VatTypeRepository
$vatTypeRepository
Methods
__construct()
public
__construct(Request $request, AuthComponent $auth, ProductService $productService, ProductRepository $productRepository, CountryRepository $countryRepository, CurrencyRepository $currencyRepository, VatTypeRepository $vatTypeRepository) : mixed
Parameters
- $request : Request
- $auth : AuthComponent
- $productService : ProductService
- $productRepository : ProductRepository
- $countryRepository : CountryRepository
- $currencyRepository : CurrencyRepository
- $vatTypeRepository : VatTypeRepository
updateProduct()
Update product by productId
public
updateProduct(int $productId) : array<string|int, mixed>
Accpets putrequest for fields: val, currency_id, backdate, comm_code, weight, comm_code, origin_coutry_id vat_type_id, country_vat_types[country_id]
Parameters
- $productId : int
Tags
Return values
array<string|int, mixed>updateProductByUserAndProduct()
public
updateProductByUserAndProduct(UserWrapper $user, ProductEntity $product, mixed $data) : mixed
Parameters
- $user : UserWrapper
- $product : ProductEntity
- $data : mixed
getFormMeta()
private
getFormMeta() : stdClass