PHP Класс Sulu\Bundle\CategoryBundle\Twig\CategoryTwigExtension

Наследование: extends Twig_Extension
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( Sulu\Bundle\CategoryBundle\Category\CategoryManagerInterface $categoryManager, Sulu\Component\Category\Request\CategoryRequestHandlerInterface $categoryRequestHandler, JMS\Serializer\SerializerInterface $serializer, Sulu\Component\Cache\MemoizeInterface $memoizeCache )
appendCategoryUrlFunction ( array $category, string $categoriesParameter = 'categories' ) : string Extends current URL with given category.
clearCategoryUrlFunction ( string $categoriesParameter = 'categories' ) : string Remove categories from current URL.
getCategoriesFunction ( string $locale, string $parentKey = null ) : array Returns an array of serialized categories.
getFunctions ( )
getName ( )
setCategoryUrlFunction ( array $category, string $categoriesParameter = 'categories' ) : string Set category to current URL.

Описание методов

__construct() публичный Метод

public __construct ( Sulu\Bundle\CategoryBundle\Category\CategoryManagerInterface $categoryManager, Sulu\Component\Category\Request\CategoryRequestHandlerInterface $categoryRequestHandler, JMS\Serializer\SerializerInterface $serializer, Sulu\Component\Cache\MemoizeInterface $memoizeCache )
$categoryManager Sulu\Bundle\CategoryBundle\Category\CategoryManagerInterface
$categoryRequestHandler Sulu\Component\Category\Request\CategoryRequestHandlerInterface
$serializer JMS\Serializer\SerializerInterface
$memoizeCache Sulu\Component\Cache\MemoizeInterface

appendCategoryUrlFunction() публичный Метод

Extends current URL with given category.
public appendCategoryUrlFunction ( array $category, string $categoriesParameter = 'categories' ) : string
$category array will be included in the URL
$categoriesParameter string GET parameter name
Результат string

clearCategoryUrlFunction() публичный Метод

Remove categories from current URL.
public clearCategoryUrlFunction ( string $categoriesParameter = 'categories' ) : string
$categoriesParameter string GET parameter name
Результат string

getCategoriesFunction() публичный Метод

If parentKey is set, only the children of the category which is assigned to the given key are returned.
public getCategoriesFunction ( string $locale, string $parentKey = null ) : array
$locale string
$parentKey string key of parent category
Результат array

getFunctions() публичный Метод

public getFunctions ( )

getName() публичный Метод

public getName ( )

setCategoryUrlFunction() публичный Метод

Set category to current URL.
public setCategoryUrlFunction ( array $category, string $categoriesParameter = 'categories' ) : string
$category array will be included in the URL
$categoriesParameter string GET parameter name
Результат string