Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
CheckoutAgreementsList.php
Go to the documentation of this file.
1 <?php
8 
13 {
19  private $collectionFactory;
20 
24  private $extensionAttributesJoinProcessor;
25 
29  private $collectionProcessor;
30 
36  public function __construct(
37  \Magento\CheckoutAgreements\Model\ResourceModel\Agreement\CollectionFactory $collectionFactory,
38  \Magento\Framework\Api\ExtensionAttribute\JoinProcessorInterface $extensionAttributesJoinProcessor,
39  \Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface $collectionProcessor
40  ) {
41  $this->collectionFactory = $collectionFactory;
42  $this->extensionAttributesJoinProcessor = $extensionAttributesJoinProcessor;
43  $this->collectionProcessor = $collectionProcessor;
44  }
45 
49  public function getList(\Magento\Framework\Api\SearchCriteriaInterface $searchCriteria) : array
50  {
52  $collection = $this->collectionFactory->create();
53  $this->collectionProcessor->process($searchCriteria, $collection);
54  $this->extensionAttributesJoinProcessor->process($collection);
55  return $collection->getItems();
56  }
57 }
__construct(\Magento\CheckoutAgreements\Model\ResourceModel\Agreement\CollectionFactory $collectionFactory, \Magento\Framework\Api\ExtensionAttribute\JoinProcessorInterface $extensionAttributesJoinProcessor, \Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface $collectionProcessor)
getList(\Magento\Framework\Api\SearchCriteriaInterface $searchCriteria)
$searchCriteria