ProductService
in package
Table of Contents
Constants
- sameColors = ["Argenté" => 23, "Beige/Marron" => 291, "Beu Foncé" => 25, "Multicouleur" => 254, "Dark" => 24, "Marron clair" => 59, "Fuchsia" => 590]
Properties
- $eventDispatcher : EventDispatcherInterface
- $productService : mixed
- AppBundle\Services\ProductService
- $allCategories : mixed
- $attributeService : AttributeService
- $categoryService : CategoryService
- $configService : ConfigService|object
- $container : ContainerInterface
- $entityManager : EntityManagerInterface
- $header : array<string|int, mixed>
- $queueService : QueueServiceInterface
- $repositoryProduct : ProductRepository
Methods
- __construct() : mixed
- export() : StreamedResponse
- Exporting sales
- exportXls() : mixed
- Exporting as Xls
- getCategories() : array<string|int, mixed>|array<string|int, int>
- getDimensionFeatures() : array<string|int, string>
- getFilterCategoryAsirMod() : void
- getFilterProductSize() : mixed
- getMappingColor() : array<string|int, mixed>
- getMappingColoris() : string
- getMatiere() : array<string|int, mixed>
- getRepo() : mixed
- logFile() : mixed
- mappingCoeff() : float|int
- mappingLamp() : string|void
- mappingTaille() : string
- save() : Product
- Save The Entity
- exportCsv() : StreamedResponse
- Exporting as csv
- getFinalCategory() : mixed|null
- Get Final category from category ids
- getPregForOne() : array<string|int, mixed>
- getPregMatch() : array<string|int, string>
Constants
sameColors
public
mixed
sameColors
= ["Argenté" => 23, "Beige/Marron" => 291, "Beu Foncé" => 25, "Multicouleur" => 254, "Dark" => 24, "Marron clair" => 59, "Fuchsia" => 590]
Properties
$eventDispatcher
protected
EventDispatcherInterface
$eventDispatcher
$productService
AppBundle\Services\ProductService
protected
mixed
$productService
$allCategories
private
mixed
$allCategories
$attributeService
private
AttributeService
$attributeService
$categoryService
private
CategoryService
$categoryService
$configService
private
ConfigService|object
$configService
$container
private
ContainerInterface
$container
$entityManager
private
EntityManagerInterface
$entityManager
$header
private
array<string|int, mixed>
$header
= ['id' => 'ID', 'img' => 'Img', 'sku' => 'Réf', 'ean' => 'Ean', 'name' => 'Nom', 'description' => 'Description', 'features' => 'Features', 'extraFeatures' => 'Extra Features', 'color' => 'Couleur', 'menzzoPrice' => 'Prix Menzzo', 'retailPrice' => 'Prix magasin', 'wholesalePrice' => 'Prix Facturé', 'cat' => 'Catégories', 'qty' => 'Qté', 'price' => 'Prix', 'variations' => 'Variantes', 'packageDimensions' => 'Dimensions', 'asirBuyPrice' => 'Prix d\'achat', 'matter' => 'Matière', 'matterDetail' => 'Matière détail', 'weight' => 'Poids', 'volume' => 'Volume', 'packagesNumber' => 'Nombre de packages', 'saleQty30' => 'Ventes sur 30j']
$queueService
private
QueueServiceInterface
$queueService
$repositoryProduct
private
ProductRepository
$repositoryProduct
Methods
__construct()
public
__construct(ContainerInterface $container, QueueServiceInterface $queueService, EntityManagerInterface $entityManager, AttributeService $attributeService, EventDispatcherInterface $eventDispatcher, ProductRepository $repositoryProduct) : mixed
Parameters
- $container : ContainerInterface
- $queueService : QueueServiceInterface
- $entityManager : EntityManagerInterface
- $attributeService : AttributeService
- $eventDispatcher : EventDispatcherInterface
- $repositoryProduct : ProductRepository
export()
Exporting sales
public
export(mixed $title, mixed $data, mixed $columns, mixed $format[, array<string|int, mixed> $customHeader = [] ]) : StreamedResponse
Parameters
- $title : mixed
- $data : mixed
- $columns : mixed
- $format : mixed
- $customHeader : array<string|int, mixed> = []
Return values
StreamedResponseexportXls()
Exporting as Xls
public
exportXls(mixed $data, mixed $columns, mixed $title[, bool $toFile = false ]) : mixed
Parameters
- $data : mixed
- $columns : mixed
- $title : mixed
- $toFile : bool = false
getCategories()
public
getCategories(mixed $product) : array<string|int, mixed>|array<string|int, int>
Parameters
- $product : mixed
Return values
array<string|int, mixed>|array<string|int, int>getDimensionFeatures()
public
getDimensionFeatures(mixed $asGroupProduct) : array<string|int, string>
Parameters
- $asGroupProduct : mixed
Return values
array<string|int, string>getFilterCategoryAsirMod()
public
getFilterCategoryAsirMod(mixed $search) : void
Parameters
- $search : mixed
getFilterProductSize()
public
getFilterProductSize(mixed $search, mixed $isSelected) : mixed
Parameters
- $search : mixed
- $isSelected : mixed
getMappingColor()
public
getMappingColor(mixed $color) : array<string|int, mixed>
Parameters
- $color : mixed
Return values
array<string|int, mixed>getMappingColoris()
public
getMappingColoris(mixed $color) : string
Parameters
- $color : mixed
Return values
stringgetMatiere()
public
getMatiere(mixed $asGroupProduct, int $id) : array<string|int, mixed>
Parameters
- $asGroupProduct : mixed
- $id : int
Return values
array<string|int, mixed>getRepo()
public
getRepo() : mixed
logFile()
public
logFile(string $msg) : mixed
Parameters
- $msg : string
mappingCoeff()
public
mappingCoeff(mixed $weight) : float|int
Parameters
- $weight : mixed
Return values
float|intmappingLamp()
public
mappingLamp(mixed $asGroupProduct) : string|void
Parameters
- $asGroupProduct : mixed
Return values
string|voidmappingTaille()
public
mappingTaille(mixed $asGroupProduct) : string
Parameters
- $asGroupProduct : mixed
Return values
stringsave()
Save The Entity
public
save(Product $catalog) : Product
Parameters
- $catalog : Product
Return values
ProductexportCsv()
Exporting as csv
private
exportCsv(mixed $data, mixed $columns, mixed $title) : StreamedResponse
Parameters
- $data : mixed
- $columns : mixed
- $title : mixed
Return values
StreamedResponsegetFinalCategory()
Get Final category from category ids
private
getFinalCategory(mixed $categoryIds) : mixed|null
Parameters
- $categoryIds : mixed
Return values
mixed|nullgetPregForOne()
private
getPregForOne(mixed $string, mixed $word) : array<string|int, mixed>
Parameters
- $string : mixed
- $word : mixed
Return values
array<string|int, mixed>getPregMatch()
private
getPregMatch(mixed $string, mixed $word) : array<string|int, string>
Parameters
- $string : mixed
- $word : mixed