CI_Cart::contents PHP Méthode

contents() public méthode

Returns the entire cart array
public contents ( $newest_first = FALSE ) : array
Résultat array
    public function contents($newest_first = FALSE)
    {
        // do we want the newest first?
        $cart = $newest_first ? array_reverse($this->_cart_contents) : $this->_cart_contents;
        // Remove these so they don't create a problem when showing the cart table
        unset($cart['total_items']);
        unset($cart['cart_total']);
        return $cart;
    }