BrandManager
class BrandManager implements BrandManagerInterface, BasicEntityManagerInterface, CSVManagerInterface, JQGridInterface
Class BrandManager is injected as alligator.brand_manager service. BrandManager handles the logic for managed entity.
Traits
Constants
| WEB_UPLOADS_DIR |
Web uploads directory path |
| TEMP_FOLDER_DIR |
Temp uploads directory path |
Properties
| protected BrandRepository | $repository | ||
| protected BrandEventContainer | $eventContainer |
Methods
No description
No description
No description
Get brands for block elements extension
Get brand reference
Get all brands slug, name and image
Get all brands for filter
Get all brands with pagination
Count all brands for pagination data
Find all brands for product page
Delete brands from provided array
Get brands for megamenu
Export brands for CSV
Custom export for CSV
Get new Brand object
Converts to appropriate entities and persists to database
Import images for brand
Persist entities to database
Get brand from database by code
Get brands array for array with ids
Get brand html from cache for provided locale
Get brand html from cache for provided locale
Generate brands html for cache
Get templating engine service
Set brands html to cache
Get brand fields from metadata
Get database settings fields
Get custom brand export fields
Get available languages
Reorder brands
Search brands using Filter
Get brand reference by id
Get all brands id and code
Get all brands id and name
Find brand object by brand name
Find attribute value ids by values
Execute custom sql
Get brand object by slug
Details
in JQGridManagerTrait at line 26
mixed
searchForJQGRID(array $searchParams, array $sortParams = array(), array $additionalParams = array(), JQGridWrapper $jqGridWrapper = null)
in JQGridManagerTrait at line 40
mixed
findAllForJQGRID(int $page, int $offset, array $sortParams, array $additionalParams = array(), JQGridWrapper $jqGridWrapper = null)
in JQGridManagerTrait at line 53
mixed
getCountForJQGRID(array|null $searchParams = null, array|null $sortParams = null, array|null $additionalParams = array(), JQGridWrapper|null $jqGridWrapper = null)
at line 721
array
getEntitiesForBlockElementsExtension(array $ids)
Get brands for block elements extension
in BlockElementManagerTrait at line 40
array
getEntityNamesForIds(array $ids)
Get id and name of entity
at line 69
__construct(BrandRepository $repository, BrandEventContainer $eventContainer)
at line 83
Brand
getReference(int $id)
Get brand reference
at line 92
array
findAllBrands()
Get all brands slug, name and image
at line 101
array
findAllBrandsForFilter()
Get all brands for filter
at line 113
array
findAllBrandsPagination(int $page, int $offset)
Get all brands with pagination
at line 122
array
countAllBrands()
Count all brands for pagination data
at line 131
array
findAllBrandsForProductPage()
Find all brands for product page
at line 145
Brand
findBrand(int $brandId)
Get brand from database
at line 158
mixed
saveBrand(Brand $brand)
Persist object to database
at line 210
mixed
deleteBrand(mixed $array)
Delete brands from provided array
at line 238
mixed
editBrand(Brand $brand)
Edit brand object
at line 281
mixed
getMegamenuBrands()
Get brands for megamenu
at line 292
mixed|void
exportToCSV()
Export brands for CSV
at line 303
mixed|void
exportCustom(array $data)
Custom export for CSV
at line 312
CSVEntityInterface
getEntityObject()
Get new Brand object
at line 320
mixed
importFromCSV(mixed $base64Content, mixed $locale, $propertyMappings = array())
Converts to appropriate entities and persists to database
at line 332
bool
importImagesForBrand(mixed $name, mixed $base64)
Import images for brand
at line 396
mixed
saveObjectsFromCSV(ArrayCollection $objectList, array $csvRow, array $entityCSVHeaders, array $propertyMappings = array())
Persist entities to database
at line 451
Brand
getDbBrandByCode(string $code)
Get brand from database by code
at line 493
Brand
getBrandWithoutTranslation(Brand $brand)
Get brand from database without translation
at line 504
mixed
getBrandsArray(array $array)
Get brands array for array with ids
at line 527
mixed
getBrandHtml(String $theme, String $locale)
Get brand html from cache for provided locale
at line 545
mixed
getBrandsHtmlFromCache(string $locale)
Get brand html from cache for provided locale
at line 557
mixed
generateBrandsHtml(String $theme, String $locale)
Generate brands html for cache
at line 573
mixed
getTemplateEngine()
Get templating engine service
at line 583
setBrandsHtmlToCache(string $brandHtml, string $locale)
Set brands html to cache
at line 592
array
getBrandFieldsFromMetadata()
Get brand fields from metadata
at line 601
mixed
getDBSettingsFields()
Get database settings fields
at line 612
mixed
getCustomBrandFieldsForExport(array $fields)
Get custom brand export fields
at line 636
array
getAvailableLanguages()
Get available languages
at line 645
dispatchGenerateBrandTranslationSignal(Brand $brand)
Dispatch generate brand translation signal
at line 656
bool
reorderBrands(array $brands)
Reorder brands
at line 678
array
searchBrands(Filter $filter, int $page = 1, int $offset = 16, array $ignoreIds = [], null $category = null)
Search brands using Filter
at line 692
mixed
getBrandReference(int $id)
Get brand reference by id
at line 701
array
getAllBrandsIdAndCode()
Get all brands id and code
at line 710
mixed
getAllBrandsIdAndName()
Get all brands id and name
at line 734
null|object
findBrandByName(string $name)
Find brand object by brand name
at line 745
array
findAttributeValueIdsByValues(array $values)
Find attribute value ids by values
at line 758
array
executeCustomSql(string $sql)
Execute custom sql
at line 792
mixed
getBrandBySlug(string $slug)
Get brand object by slug