35 lines
791 B
PHP
35 lines
791 B
PHP
<?php
|
|
|
|
/**
|
|
* Subclass for representing a row from the 'st_paczkomaty_dispatch_order' table.
|
|
*
|
|
*
|
|
*
|
|
* @package plugins.stPaczkomatyPlugin.lib.model
|
|
*/
|
|
class PaczkomatyDispatchOrder extends BasePaczkomatyDispatchOrder
|
|
{
|
|
public function __toString()
|
|
{
|
|
return null !== $this->getDispatchOrderExternalId() ? $this->getDispatchOrderExternalId() : '';
|
|
}
|
|
|
|
public function getParcels()
|
|
{
|
|
|
|
$trackingNumbers = [];
|
|
|
|
foreach ($this->getPaczkomatyPacks() as $pack)
|
|
{
|
|
$trackingNumbers[] = $pack->getTrackingNumber();
|
|
}
|
|
|
|
return implode(', ', $trackingNumbers);
|
|
}
|
|
|
|
public function getStatusLabel()
|
|
{
|
|
return stInPostApi::getInstance()->getDispatchOrderStatusTitleByName($this->status);
|
|
}
|
|
}
|