-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* v2.2.1 init * PES-429: order grid update (#44) * PES-429: order grid update * PES-429: order grid update - CR * PES-410: slow order grid fix * PES-410: slow order grid fix - hybrid carrier caching * PES-410: slow order grid fix - change log update Co-authored-by: packeta <[email protected]>
- Loading branch information
1 parent
ee52f27
commit 639a2e3
Showing
6 changed files
with
209 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
Packetery/Checkout/Model/ResourceModel/Order/CollectionFactory.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Packetery\Checkout\Model\ResourceModel\Order; | ||
|
||
class CollectionFactory | ||
{ | ||
/** | ||
* Object Manager instance | ||
* | ||
* @var \Magento\Framework\ObjectManagerInterface | ||
*/ | ||
protected $objectManager; | ||
|
||
/** | ||
* Instance name to create | ||
* | ||
* @var string | ||
*/ | ||
protected $instanceName; | ||
|
||
/** | ||
* Factory constructor | ||
* | ||
* @param \Magento\Framework\ObjectManagerInterface $objectManager | ||
* @param string $instanceName | ||
*/ | ||
public function __construct(\Magento\Framework\ObjectManagerInterface $objectManager, $instanceName = Collection::class) | ||
{ | ||
$this->objectManager = $objectManager; | ||
$this->instanceName = $instanceName; | ||
} | ||
|
||
/** | ||
* Create class instance with specified parameters | ||
* | ||
* @param array $data Class constructor arguments to override auto-wiring or specify non-service arguments. | ||
* @return \Packetery\Checkout\Model\ResourceModel\Order\Collection | ||
*/ | ||
public function create(array $data = []) | ||
{ | ||
/** @var \Packetery\Checkout\Model\ResourceModel\Order\Collection $collection */ | ||
$collection = $this->objectManager->create($this->instanceName, $data); | ||
$collection->joinSalesOrder(); | ||
return $collection; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters