Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions
BulkManagement Class Reference
Inheritance diagram for BulkManagement:
BulkManagementInterface

Public Member Functions

 __construct (EntityManager $entityManager, BulkSummaryInterfaceFactory $bulkSummaryFactory, CollectionFactory $operationCollectionFactory, BulkPublisherInterface $publisher, MetadataPool $metadataPool, ResourceConnection $resourceConnection, \Psr\Log\LoggerInterface $logger, UserContextInterface $userContext=null)
 
 deleteBulk ($bulkId)
 
- Public Member Functions inherited from BulkManagementInterface
 scheduleBulk ($bulkUuid, array $operations, $description, $userId=null)
 

Detailed Description

Class BulkManagement

@SuppressWarnings(PHPMD.CouplingBetweenObjects)

Definition at line 24 of file BulkManagement.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( EntityManager  $entityManager,
BulkSummaryInterfaceFactory  $bulkSummaryFactory,
CollectionFactory  $operationCollectionFactory,
BulkPublisherInterface  $publisher,
MetadataPool  $metadataPool,
ResourceConnection  $resourceConnection,
\Psr\Log\LoggerInterface  $logger,
UserContextInterface  $userContext = null 
)

BulkManagement constructor.

Parameters
EntityManager$entityManager
BulkSummaryInterfaceFactory$bulkSummaryFactory
CollectionFactory$operationCollectionFactory
BulkPublisherInterface$publisher
MetadataPool$metadataPool
ResourceConnection$resourceConnection
\Psr\Log\LoggerInterface$logger
UserContextInterface$userContext

Definition at line 77 of file BulkManagement.php.

86  {
87  $this->entityManager = $entityManager;
88  $this->bulkSummaryFactory= $bulkSummaryFactory;
89  $this->operationCollectionFactory = $operationCollectionFactory;
90  $this->metadataPool = $metadataPool;
91  $this->resourceConnection = $resourceConnection;
92  $this->publisher = $publisher;
93  $this->logger = $logger;
94  $this->userContext = $userContext ?: ObjectManager::getInstance()->get(UserContextInterface::class);
95  }

Member Function Documentation

◆ deleteBulk()

deleteBulk (   $bulkId)

@inheritDoc

Implements BulkManagementInterface.

Definition at line 211 of file BulkManagement.php.

212  {
213  return $this->entityManager->delete(
214  $this->entityManager->load(
215  $this->bulkSummaryFactory->create(),
216  $bulkId
217  )
218  );
219  }

The documentation for this class was generated from the following file: