/**
  * Returns list of comments attached to shipment
  * @param int $id
  * @return \Magento\Sales\Api\Data\ShipmentCommentSearchResultInterface
  */
 public function getCommentsList($id)
 {
     $this->criteriaBuilder->addFilters([$this->filterBuilder->setField('parent_id')->setValue($id)->setConditionType('eq')->create()]);
     $searchCriteria = $this->criteriaBuilder->create();
     return $this->commentRepository->getList($searchCriteria);
 }
Пример #2
0
 /**
  * Returns list of comments attached to shipment
  * @param int $id
  * @return \Magento\Sales\Api\Data\ShipmentCommentSearchResultInterface
  */
 public function getCommentsList($id)
 {
     $this->criteriaBuilder->addFilter(['eq' => $this->filterBuilder->setField('parent_id')->setValue($id)->create()]);
     $criteria = $this->criteriaBuilder->create();
     return $this->commentRepository->getList($criteria);
 }