OXID eShop CE  4.9.7
 All Classes Files Functions Variables Pages
order_downloads.php
Go to the documentation of this file.
1 <?php
2 
9 {
10 
16  protected $_oEditObject = null;
17 
24  public function render()
25  {
27 
28  if ($oOrder = $this->getEditObject()) {
29  $this->_aViewData["edit"] = $oOrder;
30  }
31 
32  return "order_downloads.tpl";
33  }
34 
40  public function getEditObject()
41  {
42  $soxId = $this->getEditObjectId();
43  if ($this->_oEditObject === null && isset($soxId) && $soxId != "-1") {
44  $this->_oEditObject = oxNew("oxOrderFileList");
45  $this->_oEditObject->loadOrderFiles($soxId);
46  }
47 
48  return $this->_oEditObject;
49  }
50 
54  public function resetDownloadLink()
55  {
56  $sOrderFileId = oxRegistry::getConfig()->getRequestParameter('oxorderfileid');
57  $oOrderFile = oxNew("oxorderfile");
58  if ($oOrderFile->load($sOrderFileId)) {
59  $oOrderFile->reset();
60  $oOrderFile->save();
61  }
62  }
63 }