|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/** |
|
4
|
|
|
* @license GPLv3, http://www.gnu.org/copyleft/gpl.html |
|
5
|
|
|
* @copyright Metaways Infosystems GmbH, 2013 |
|
6
|
|
|
* @copyright Aimeos (aimeos.org), 2014-2016 |
|
7
|
|
|
* @package TYPO3 |
|
8
|
|
|
*/ |
|
9
|
|
|
|
|
10
|
|
|
|
|
11
|
|
|
namespace Aimeos\Aimeos\Controller; |
|
12
|
|
|
|
|
13
|
|
|
|
|
14
|
|
|
use Aimeos\Aimeos\Base; |
|
15
|
|
|
|
|
16
|
|
|
|
|
17
|
|
|
/** |
|
18
|
|
|
* Aimeos account controller. |
|
19
|
|
|
* |
|
20
|
|
|
* @package TYPO3 |
|
21
|
|
|
*/ |
|
22
|
|
|
class AccountController extends AbstractController |
|
23
|
|
|
{ |
|
24
|
|
|
/** |
|
25
|
|
|
* Renders the saved account baskets. |
|
26
|
|
|
*/ |
|
27
|
|
|
public function basketAction() |
|
28
|
|
|
{ |
|
29
|
|
|
$client = \Aimeos\Client\Html::create($this->context(), 'account/basket'); |
|
30
|
|
|
return $this->getClientOutput($client); |
|
31
|
|
|
} |
|
32
|
|
|
|
|
33
|
|
|
|
|
34
|
|
|
/** |
|
35
|
|
|
* Renders the account download |
|
36
|
|
|
*/ |
|
37
|
|
|
public function downloadAction() |
|
38
|
|
|
{ |
|
39
|
|
|
$context = $this->context(); |
|
40
|
|
|
$view = $context->view(); |
|
41
|
|
|
|
|
42
|
|
|
$client = \Aimeos\Client\Html::create($context, 'account/download'); |
|
43
|
|
|
$client->setView($view)->init(); |
|
44
|
|
|
|
|
45
|
|
|
if (!isset($this->responseFactory)) // TYPO3 10 |
|
46
|
|
|
{ |
|
47
|
|
|
$response = $view->response(); |
|
48
|
|
|
|
|
49
|
|
|
$this->response->setStatus($response->getStatusCode()); |
|
|
|
|
|
|
50
|
|
|
|
|
51
|
|
|
foreach ($response->getHeaders() as $key => $value) { |
|
52
|
|
|
$this->response->setHeader($key, implode(', ', $value)); |
|
53
|
|
|
} |
|
54
|
|
|
|
|
55
|
|
|
return (string) $response->getBody(); |
|
56
|
|
|
} |
|
57
|
|
|
|
|
58
|
|
|
return $view->response(); |
|
59
|
|
|
} |
|
60
|
|
|
|
|
61
|
|
|
|
|
62
|
|
|
/** |
|
63
|
|
|
* Renders the account history. |
|
64
|
|
|
*/ |
|
65
|
|
|
public function historyAction() |
|
66
|
|
|
{ |
|
67
|
|
|
$client = \Aimeos\Client\Html::create($this->context(), 'account/history'); |
|
68
|
|
|
return $this->getClientOutput($client); |
|
69
|
|
|
} |
|
70
|
|
|
|
|
71
|
|
|
|
|
72
|
|
|
/** |
|
73
|
|
|
* Renders the account favorites. |
|
74
|
|
|
*/ |
|
75
|
|
|
public function favoriteAction() |
|
76
|
|
|
{ |
|
77
|
|
|
$client = \Aimeos\Client\Html::create($this->context(), 'account/favorite'); |
|
78
|
|
|
return $this->getClientOutput($client); |
|
79
|
|
|
} |
|
80
|
|
|
|
|
81
|
|
|
|
|
82
|
|
|
/** |
|
83
|
|
|
* Renders the account profile. |
|
84
|
|
|
*/ |
|
85
|
|
|
public function profileAction() |
|
86
|
|
|
{ |
|
87
|
|
|
$client = \Aimeos\Client\Html::create($this->context(), 'account/profile'); |
|
88
|
|
|
return $this->getClientOutput($client); |
|
89
|
|
|
} |
|
90
|
|
|
|
|
91
|
|
|
|
|
92
|
|
|
/** |
|
93
|
|
|
* Renders the account review. |
|
94
|
|
|
*/ |
|
95
|
|
|
public function reviewAction() |
|
96
|
|
|
{ |
|
97
|
|
|
$client = \Aimeos\Client\Html::create($this->context(), 'account/review'); |
|
98
|
|
|
return $this->getClientOutput($client); |
|
99
|
|
|
} |
|
100
|
|
|
|
|
101
|
|
|
|
|
102
|
|
|
/** |
|
103
|
|
|
* Renders the account subscriptions. |
|
104
|
|
|
*/ |
|
105
|
|
|
public function subscriptionAction() |
|
106
|
|
|
{ |
|
107
|
|
|
$client = \Aimeos\Client\Html::create($this->context(), 'account/subscription'); |
|
108
|
|
|
return $this->getClientOutput($client); |
|
109
|
|
|
} |
|
110
|
|
|
|
|
111
|
|
|
|
|
112
|
|
|
/** |
|
113
|
|
|
* Renders the account watch list. |
|
114
|
|
|
*/ |
|
115
|
|
|
public function watchAction() |
|
116
|
|
|
{ |
|
117
|
|
|
$client = \Aimeos\Client\Html::create($this->context(), 'account/watch'); |
|
118
|
|
|
return $this->getClientOutput($client); |
|
119
|
|
|
} |
|
120
|
|
|
} |
|
121
|
|
|
|