Class Mage_Catalog_Model_Resource_Url
Catalog url rewrite resource model
- Mage_Core_Model_Resource_Abstract
- Mage_Core_Model_Resource_Db_Abstract
- Mage_Catalog_Model_Resource_Url
Direct known subclasses
Mage_Catalog_Model_Resource_Eav_Mysql4_UrlCategory: Mage
Copyright: Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
License: Open Software License (OSL 3.0)
Author: Magento Core Team <core@magentocommerce.com>
Located at code/core/Mage/Catalog/Model/Resource/Url.php
protected
|
|
public
|
|
public
|
|
public
|
|
public
Varien_Object|false
|
|
public
Varien_Object|false
|
|
public
integer
|
#
getLastUsedRewriteRequestIncrement( string $prefix, string $suffix, integer $storeId )
Get last used increment part of rewrite request path |
public
false
|
#
checkRequestPaths( array $paths, integer $storeId )
Validate array of request paths. Return first not used path in case if validations passed |
public
array
|
#
prepareRewrites( integer $storeId, integer|array $categoryIds = null, integer|array $productIds = null )
Prepare rewrites for condition |
public
|
|
public
|
|
public
|
|
protected
array
|
#
_getCategoryAttribute( string $attributeCode, integer|array $categoryIds, integer $storeId )
Retrieve category attributes |
public
|
|
public
array
|
#
_getProductAttribute( string $attributeCode, integer|array $productIds, string $storeId )
Retrieve product attribute |
protected
|
|
protected
array
|
|
protected
array
|
#
_getCategories( integer|array $categoryIds, integer $storeId = null, string $path = null )
Retrieve categories objects Either $categoryIds or $path (with ending slash) must be specified |
public
Varien_Object
|
|
public
array
|
#
getCategories( integer|array $categoryIds, integer $storeId )
Retrieve categories data objects by their ids. Return only categories that belong to specified store. |
public
Varien_Object
|
|
public
Varien_Object
|
#
getRootChildrenIds( Varien_Object $categoryId, mixed $categoryPath, mixed $includeStart = true )
Retrieves all children ids of root category tree Actually this routine can be used to get children ids of any category, not only root. But as far as result is cached in memory, it's not recommended to do so. |
public
string
|
|
public
array
|
|
protected
array
|
#
_getProducts( integer|array $productIds, integer $storeId, integer $entityId, integer & $lastEntityId )
Retrieve Product data objects |
public
Varien_Object
|
|
public
array
|
#
getProductsByStore( integer $storeId, integer & $lastEntityId )
Retrieve Product data obects for store |
public
array
|
#
getProductsByCategory( Varien_Object $category, integer & $lastEntityId )
Retrieve Product data objects in category |
public
|
#
clearCategoryProduct( integer $storeId )
Find and remove unused products rewrites - a case when products were moved away from the category (either to other category or deleted), so rewrite "category_id-product_id" is invalid |
public
|
#
clearProductRewrites( integer $productId, integer $storeId, array $excludeCategoryIds = array() )
Remove unused rewrites for product - called after we created all needed rewrites for product and know the categories where the product is contained ($excludeCategoryIds), so we can remove all invalid product rewrites that have other category ids |
public
|
#
clearStoreCategoriesInvalidRewrites( integer $storeId )
Finds and deletes all old category and category/product rewrites for store left from the times when categories/products belonged to store |
public
|
#
clearStoreProductsInvalidRewrites( integer $storeId, integer|array|null $productId = null )
Finds and deletes product rewrites (that are not assigned to any category) for store left from the times when product was assigned to this store's website and now is not assigned |
public
|
#
clearStoreInvalidRewrites( integer $storeId )
Finds and deletes old rewrites for store
|
public
|
#
deleteCategoryProductRewrites( integer $categoryId, array $productIds )
Delete rewrites for associated to category products |
public
|
#
deleteCategoryProductStoreRewrites( integer $categoryId, array|integer|null $productIds = null, null|integer $storeId = null )
Delete URL rewrites for category products of specific store |
public
array
|
#
getRewriteByProductStore( array $products )
Retrieve rewrites and visibility by store Input array format: product_id as key and store_id as value Output array format (product_id as key) store_id int; store id visibility int; visibility for store url_rewrite string; rewrite URL for store |
public
string
|
#
findFinalTargetPath( string $requestPath, integer $storeId, array & $_checkedPaths = array() )
Find and return final id path by request path Needed for permanent redirect old URLs. |
public
|
#
deleteRewrite( string $requestPath, integer $storeId )
Delete rewrite path record from the database. |
public
|
#
deleteRewriteRecord( string $requestPath, integer $storeId, boolean $rp = false )
Delete rewrite path record from the database with RP checking. |
protected
array
|
$_stores |
|
#
Stores configuration array |
protected
array
|
$_categoryAttributes | array() |
#
Category attribute properties cache |
protected
array
|
$_productAttributes | array() |
#
Product attribute properties cache |
protected
integer
|
$_productLimit | 250 |
#
Limit products for select |
protected
array
|
$_rootChildrenIds | array() |
#
Cache of root category children ids |
$_commitCallbacks
|