Свойство | Тип | Описание | |
---|---|---|---|
$categoryNames | An array containing category names, to use as local cache |
Метод | Описание | |
---|---|---|
__construct ( Magento\Framework\ObjectManagerInterface $objectManager, Magento\Framework\UrlInterface $urlBuilder, Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, Magento\Catalog\Model\ResourceModel\Category $categoryResource ) | ItemFactory constructor. | |
create ( array $data ) | {@inheritDoc} |
Метод | Описание | |
---|---|---|
addCategoryData ( array $data ) : array | Load category data and append them to the original data. | |
getCategoryBreadcrumb ( Magento\Catalog\Model\Category $category ) : array | Return a mini-breadcrumb for a category | |
getCategoryNameById ( integer $categoryId, integer $storeId ) : string | Retrieve a category name by it's id, and store it in local cache | |
getCategoryUrl ( Magento\Catalog\Model\Category $category ) : string | Retrieve category Url from the document source. |
public __construct ( Magento\Framework\ObjectManagerInterface $objectManager, Magento\Framework\UrlInterface $urlBuilder, Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, Magento\Catalog\Model\ResourceModel\Category $categoryResource ) | ||
$objectManager | Magento\Framework\ObjectManagerInterface | The Object Manager |
$urlBuilder | Magento\Framework\UrlInterface | The Url Builder |
$scopeConfig | Magento\Framework\App\Config\ScopeConfigInterface | The Scope Config |
$categoryResource | Magento\Catalog\Model\ResourceModel\Category | Category Resource Model |