示例#1
0
 /**
  * @return Note[]
  */
 public function getFullChangeLog()
 {
     if (!$this->fullChangeLog) {
         // init
         $order = $this->getOrder();
         // load order events
         $noteList = new NoteListing();
         /* @var \Pimcore\Model\Element\Note\Listing $noteList */
         $cid = [$order->getId()];
         foreach ($order->getItems() as $item) {
             $cid[] = $item->getId();
         }
         $noteList->addConditionParam('type = ?', 'order-agent');
         $noteList->addConditionParam(sprintf('cid in(%s)', implode(',', $cid)), '');
         $noteList->setOrderKey('date');
         $noteList->setOrder('desc');
         $this->fullChangeLog = $noteList->load();
     }
     return $this->fullChangeLog;
 }