public function getBasket()
    {
        if (!$this->basket) {
            try {
                $this->basket = $this->basketFactory->load($this->customerSelector->get());
            } catch (\Exception $e) {
                // something went wrong while loading the basket
                throw $e;
            }
        }

        return $this->basket;
    }
public function getBasket()
    {
        if (!$this->basket) {
            try {
                $this->basket = $this->basketFactory->load($this->customerSelector->get());
            } catch (\Exception $e) {
                // something went wrong while loading the basket
                throw $e;
            }
        }

        return $this->basket;
    }
public function getBasket ( ) { if ( ! $ this -> basket ) { try { $ this -> basket = $ this -> basketFactory -> load ( $ this -> customerSelector -> get ( ) ) ; } catch ( \ Exception $ e ) { // something went wrong while loading the basket throw $ e ; } } return $ this -> basket ; }
Get the basket.

@throws \Exception|\RuntimeException

@return \Sonata\Component\Basket\BasketInterface
Get the basket .