Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Variables
quote_with_downloadable_product.php File Reference

Go to the source code of this file.

Variables

 $productRepository
 
 $product = $productRepository->get('downloadable-product')
 
 $linkCollection
 
 $link = $linkCollection->getFirstItem()
 
 $requestInfo = new \Magento\Framework\DataObject(['qty' => 1, 'links' => [$link->getId()]])
 
 $cart = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(\Magento\Checkout\Model\Cart::class)
 
 $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
 

Variable Documentation

◆ $cart

$cart = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(\Magento\Checkout\Model\Cart::class)

Definition at line 32 of file quote_with_downloadable_product.php.

◆ $link

$link = $linkCollection->getFirstItem()

Definition at line 27 of file quote_with_downloadable_product.php.

◆ $linkCollection

$linkCollection
Initial value:
\Magento\Downloadable\Model\Link::class
)->getCollection()->addProductToFilter(
$product->getId()
)->addTitleToResult(
$product->getStoreId()
)->addPriceToResult(
$product->getStore()->getWebsiteId()
)

Definition at line 16 of file quote_with_downloadable_product.php.

◆ $objectManager

Definition at line 37 of file quote_with_downloadable_product.php.

◆ $product

$product = $productRepository->get('downloadable-product')

Definition at line 13 of file quote_with_downloadable_product.php.

◆ $productRepository

$productRepository
Initial value:
->create(\Magento\Catalog\Api\ProductRepositoryInterface::class)

Definition at line 10 of file quote_with_downloadable_product.php.

◆ $requestInfo

$requestInfo = new \Magento\Framework\DataObject(['qty' => 1, 'links' => [$link->getId()]])

Definition at line 29 of file quote_with_downloadable_product.php.