mirror of
https://github.com/bdnugget/magento2.git
synced 2026-11-08 01:37:36 +00:00
34 lines
734 B
PHP
34 lines
734 B
PHP
<?php
|
|
/**
|
|
* Copyright © Magento, Inc. All rights reserved.
|
|
* See COPYING.txt for license details.
|
|
*/
|
|
namespace Magento\Ups\Model\Config\Source;
|
|
|
|
/**
|
|
* Class OriginShipment
|
|
*/
|
|
class OriginShipment extends \Magento\Ups\Model\Config\Source\Generic
|
|
{
|
|
/**
|
|
* Carrier code
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $_code = 'originShipment';
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
* @SuppressWarnings(PHPMD.UnusedLocalVariable)
|
|
*/
|
|
public function toOptionArray()
|
|
{
|
|
$orShipArr = $this->carrierConfig->getCode($this->_code);
|
|
$returnArr = [];
|
|
foreach ($orShipArr as $key => $val) {
|
|
$returnArr[] = ['value' => $key, 'label' => $key];
|
|
}
|
|
return $returnArr;
|
|
}
|
|
}
|