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

Go to the source code of this file.

Variables

 $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
 
 $productRepository = $objectManager->create(\Magento\Catalog\Api\ProductRepositoryInterface::class)
 
 $product = $productRepository->get('simple')
 
 $image = array_shift($product->getData('media_gallery')['images'])
 

Variable Documentation

◆ $image

$image = array_shift($product->getData('media_gallery')['images'])

Definition at line 32 of file product_export_with_images.php.

◆ $objectManager

Copyright © Magento, Inc. All rights reserved. See COPYING.txt for license details.

Definition at line 10 of file product_export_with_images.php.

◆ $product

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

Definition at line 13 of file product_export_with_images.php.

◆ $productRepository

$productRepository = $objectManager->create(\Magento\Catalog\Api\ProductRepositoryInterface::class)

Definition at line 12 of file product_export_with_images.php.