프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$locale | Elcodi\Component\Language\Entity\Interfaces\LocaleInterface | Locale in which the categories are stored |
메소드 | 설명 | |
---|---|---|
__construct ( Elcodi\Component\Product\Services\CategoryTree $categoryTreeService, boolean $loadOnlyCategoriesWithProducts, string $key, Elcodi\Component\Language\Entity\Interfaces\LocaleInterface $locale ) | Construct method | |
getStoreCategoryTree ( ) : array | Get category tree | |
load ( ) : array | Load Category tree from cache. | |
reload ( ) : array | Reload Category tree from cache |
메소드 | 설명 | |
---|---|---|
buildCategoryTreeAndSaveIntoCache ( ) : array | Build category tree and save it into cache | |
buildStoreCategoryTree ( ) : Array | Build the store category tree (Can change depending on categories enabled and store config). | |
formatCategoryNode ( array $categoryNode ) : array | Formats a category node form a category tree to return it on a store friendly format. | |
formatCategoryTree ( array &$categoryTree ) : array | Formats a category tree to return it on a store friendly format. | |
getKey ( ) | Get current key | |
isCategoryEnabled ( Elcodi\Component\Product\Entity\Category $category ) : boolean | Checks if a category is enabled. A category can be disabled by itself or by other store configurations like the options to only load categories with products. | |
loadCategoryTreeFromCache ( ) : array | Load category tree from cache | |
saveCategoryTreeIntoCache ( array $categoryTree ) | Save given category tree into cache |
public __construct ( Elcodi\Component\Product\Services\CategoryTree $categoryTreeService, boolean $loadOnlyCategoriesWithProducts, string $key, Elcodi\Component\Language\Entity\Interfaces\LocaleInterface $locale ) | ||
$categoryTreeService | Elcodi\Component\Product\Services\CategoryTree | The category tree service |
$loadOnlyCategoriesWithProducts | boolean | Load only categories with products |
$key | string | Key where to store info |
$locale | Elcodi\Component\Language\Entity\Interfaces\LocaleInterface | Locale of the categories |
protected buildCategoryTreeAndSaveIntoCache ( ) : array | ||
리턴 | array | Category tree |
protected buildStoreCategoryTree ( ) : Array | ||
리턴 | Array | Category tree |
protected formatCategoryNode ( array $categoryNode ) : array | ||
$categoryNode | array | The category node to format |
리턴 | array | The formatted category node. |
protected formatCategoryTree ( array &$categoryTree ) : array | ||
$categoryTree | array | The categories tree. |
리턴 | array | The formatted category tree |
public getStoreCategoryTree ( ) : array | ||
리턴 | array | Category tree |
protected isCategoryEnabled ( Elcodi\Component\Product\Entity\Category $category ) : boolean | ||
$category | Elcodi\Component\Product\Entity\Category | The category to check. |
리턴 | boolean | If the category is enabled and should be showed on the categories tree. |
protected loadCategoryTreeFromCache ( ) : array | ||
리턴 | array | Category tree |
protected saveCategoryTreeIntoCache ( array $categoryTree ) | ||
$categoryTree | array | Category tree |