* * @deprecated CartTrait is deprecated, please use Session::getSessionCart method instead */ trait CartTrait { /** * * search if cart already exists in session. If not try to create a new one or duplicate an old one. * * @param EventDispatcherInterface $dispatcher the event dispatcher * @param \Symfony\Component\HttpFoundation\Request $request * @deprecated use Session::getSessionCart method instead * @return \Thelia\Model\Cart */ public function getCart(EventDispatcherInterface $dispatcher, Request $request) { trigger_error( 'CartTrait is deprecated, please use Session::getSessionCart method instead', E_USER_DEPRECATED ); return $request->getSession()->getSessionCart($dispatcher); } }