Twig/CartExtension.php
public function renderCartWidget(array $options = [])
    {
        $template = array_key_exists('template', $options) ? $options['template'] : $this->config['templates']['widget'];
        $cart = array_key_exists('cart', $options) ? $options['cart'] : $this->cartProvider->getCart();

        return $this->twig->render($template, ['cart' => $cart]);
    }
public function renderCartWidget(array $options = [])
    {
        $template = array_key_exists('template', $options) ? $options['template'] : $this->config['templates']['widget'];
        $cart = array_key_exists('cart', $options) ? $options['cart'] : $this->cartProvider->getCart();

        return $this->twig->render($template, ['cart' => $cart]);
    }
public function renderCartWidget ( array $ options = [ ] ) { $ template = array_key_exists ( 'template' , $ options ) ? $ options [ 'template' ] : $ this -> config [ 'templates' ] [ 'widget' ] ; $ cart = array_key_exists ( 'cart' , $ options ) ? $ options [ 'cart' ] : $ this -> cartProvider -> getCart ( ) ; return $ this -> twig -> render ( $ template , [ 'cart' => $ cart ] ) ; }
Renders the cart widget.

@param array $options

@return string
Renders the cart widget .