|
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Go to the source code of this file.
Variables | |
| $productId = 333 | |
| $objectManager = Bootstrap::getObjectManager() | |
| $storeRepository = $objectManager->get(StoreRepositoryInterface::class) | |
| $resourceConnection = $objectManager->get(ResourceConnection::class) | |
| $connection = $resourceConnection->getConnection() | |
| $registry = $objectManager->get(Registry::class) | |
| $productRepository = $objectManager->get(ProductRepositoryInterface::class) | |
| $isSecuredAreaSystemState = $registry->registry('isSecuredArea') | |
| $store = $storeRepository->get('customstoreview1') | |
| $storeGroupId = $store->getStoreGroupId() | |
| $websiteId = $store->getWebsiteId() | |
| try | |
| if($product->getId()) catch(\Magento\Framework\Exception\NoSuchEntityException $e) | $storeCodes |
| $website = Bootstrap::getObjectManager()->create(\Magento\Store\Model\Website::class) | |
| $connection = $resourceConnection->getConnection() |
Definition at line 29 of file website_attribute_sync_rollback.php.
| $isSecuredAreaSystemState = $registry->registry('isSecuredArea') |
Marks area as secure so Product repository would allow product removal
Definition at line 37 of file website_attribute_sync_rollback.php.
| $objectManager = Bootstrap::getObjectManager() |
Definition at line 23 of file website_attribute_sync_rollback.php.
| $productId = 333 |
Roll back fixtures
Definition at line 22 of file website_attribute_sync_rollback.php.
| $productRepository = $objectManager->get(ProductRepositoryInterface::class) |
Definition at line 31 of file website_attribute_sync_rollback.php.
| $registry = $objectManager->get(Registry::class) |
Definition at line 30 of file website_attribute_sync_rollback.php.
| $resourceConnection = $objectManager->get(ResourceConnection::class) |
Definition at line 25 of file website_attribute_sync_rollback.php.
| $store = $storeRepository->get('customstoreview1') |
Definition at line 44 of file website_attribute_sync_rollback.php.
| if ( $product->getId()) catch (\Magento\Framework\Exception\NoSuchEntityException $e) $storeCodes |
Remove stores by code
Definition at line 60 of file website_attribute_sync_rollback.php.
| $storeGroupId = $store->getStoreGroupId() |
Definition at line 45 of file website_attribute_sync_rollback.php.
| $storeRepository = $objectManager->get(StoreRepositoryInterface::class) |
Definition at line 24 of file website_attribute_sync_rollback.php.
| $website = Bootstrap::getObjectManager()->create(\Magento\Store\Model\Website::class) |
Definition at line 86 of file website_attribute_sync_rollback.php.
| $websiteId = $store->getWebsiteId() |
Definition at line 46 of file website_attribute_sync_rollback.php.
| try |
Definition at line 48 of file website_attribute_sync_rollback.php.