1: <?php
2:
3: /*
4:
5: *
6: * NOTICE OF LICENSE
7: *
8: * This source file is subject to the Open Software License (OSL 3.0)
9: * or OpenGPL v3 license (GNU Public License V3.0)
10: * that is bundled with this package in the file LICENSE.txt.
11: * It is also available through the world-wide-web at this URL:
12: * http://opensource.org/licenses/osl-3.0.php
13: * or
14: * http://www.gnu.org/licenses/gpl-3.0.txt
15: * If you did not receive a copy of the license and are unable to
16: * obtain it through the world-wide-web, please send an email
17: * to info@e-abi.ee so we can send you a copy immediately.
18: *
19: * DISCLAIMER
20: *
21: * Do not edit or add to this file if you wish to upgrade this module to newer
22: * versions in the future.
23: *
24: * @category Eabi
25: * @package Eabi_Dpd
26: * @copyright Copyright (c) 2014 Aktsiamaailm LLC (http://en.e-abi.ee/)
27: * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
28: * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License V3.0
29: * @author Matis Halmann
30: *
31:
32: */
33:
34: /**
35: * <p>Source model of all possible DPD API service codes</p>
36: *
37: * @author Matis
38: */
39: class Eabi_DpdEE_Model_Source_Service {
40:
41:
42: /**
43: * <p>Returns allowed services in automatic datasending application in following format:</p>
44: * <pre>
45: array(
46: 'label' => HTML select label,
47: 'value' => HTML select option value,
48: );
49: * </pre>
50: * @return array
51: */
52: public function toOptionArray() {
53: $options = array();
54: $options[] = array(
55: 'label' => $this->_getDpdHelper()->__('Pickup Order only'),
56: 'value' => 'PO',
57: );
58: $options[] = array(
59: 'label' => $this->_getDpdHelper()->__('Labels Only'),
60: 'value' => 'LO',
61: );
62: $options[] = array(
63: 'label' => $this->_getDpdHelper()->__('Full Order'),
64: 'value' => 'FO',
65: );
66: $options[] = array(
67: 'label' => $this->_getDpdHelper()->__('Collection Request'),
68: 'value' => 'CR',
69: );
70:
71: return $options;
72:
73: }
74:
75: /**
76: *
77: * @return Eabi_DpdEE_Helper_Data
78: */
79: protected function _getDpdHelper() {
80: return Mage::helper('eabi_dpdee');
81: }
82: }
83:
84: