PHP Class WellCommerce\Bundle\CategoryBundle\Manager\CategoryManager

Author: Adam Piotrowski ([email protected])
Inheritance: extends WellCommerce\Bundle\DoctrineBundle\Manager\AbstractManager
Mostra file Open project: wellcommerce/wellcommerce

Public Methods

Method Description
quickAddCategory ( string $name, integer $parent, WellCommerce\Bundle\ShopBundle\Entity\ShopInterface $shop ) : WellCommerce\Bundle\CategoryBundle\Entity\CategoryInterface Adds a new category
sortCategories ( array $items ) Sorts categories passed in request

Protected Methods

Method Description
getLocaleSlug ( Locale $locale, string $categoryName ) : mixed | string Returns category slug
translateCategory ( Locale $locale, Category $category, string $name ) Translates the category

Method Details

getLocaleSlug() protected method

Returns category slug
protected getLocaleSlug ( Locale $locale, string $categoryName ) : mixed | string
$locale WellCommerce\Bundle\LocaleBundle\Entity\Locale
$categoryName string
return mixed | string

quickAddCategory() public method

Adds a new category
public quickAddCategory ( string $name, integer $parent, WellCommerce\Bundle\ShopBundle\Entity\ShopInterface $shop ) : WellCommerce\Bundle\CategoryBundle\Entity\CategoryInterface
$name string
$parent integer
$shop WellCommerce\Bundle\ShopBundle\Entity\ShopInterface
return WellCommerce\Bundle\CategoryBundle\Entity\CategoryInterface

sortCategories() public method

Sorts categories passed in request
public sortCategories ( array $items )
$items array

translateCategory() protected method

Translates the category
protected translateCategory ( Locale $locale, Category $category, string $name )
$locale WellCommerce\Bundle\LocaleBundle\Entity\Locale
$category WellCommerce\Bundle\CategoryBundle\Entity\Category
$name string