Twig/CategoryExtension.php
public function renderCategoryTree(
        \Twig_Environment $environment,
        $tree,
        $selectedCategory = null,
        $currentCategory = null,
        $template = null
    ) {
        if (count($tree)) {
            if ($template === null) {
                $template = $this->getTemplate();
            }

            return $environment->render(
                $template,
                [
                    'categories' => $tree,
                    'selected_category' => $selectedCategory,
                    'current_category' => $currentCategory,
                ]
            );
        }

        return null;
    }
public function renderCategoryTree(
        \Twig_Environment $environment,
        $tree,
        $selectedCategory = null,
        $currentCategory = null,
        $template = null
    ) {
        if (count($tree)) {
            if ($template === null) {
                $template = $this->getTemplate();
            }

            return $environment->render(
                $template,
                [
                    'categories' => $tree,
                    'selected_category' => $selectedCategory,
                    'current_category' => $currentCategory,
                ]
            );
        }

        return null;
    }
public function renderCategoryTree ( \ Twig_Environment $ environment , $ tree , $ selectedCategory = null , $ currentCategory = null , $ template = null ) { if ( count ( $ tree ) ) { if ( $ template === null ) { $ template = $ this -> getTemplate ( ) ; } return $ environment -> render ( $ template , [ 'categories' => $ tree , 'selected_category' => $ selectedCategory , 'current_category' => $ currentCategory , ] ) ; } return null ; }
Renders category tree.

@param \Twig_Environment    $environment
@param array|\ArrayIterator $tree
@param string|null          $selectedCategory
@param string|null          $currentCategory
@param string|null          $template

@return null|string
Renders category tree .