|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/** |
|
4
|
|
|
* @license LGPLv3, http://www.gnu.org/copyleft/lgpl.html |
|
5
|
|
|
* @copyright Aimeos (aimeos.org), 2015-2016 |
|
6
|
|
|
* @package flow |
|
7
|
|
|
* @subpackage Controller |
|
8
|
|
|
*/ |
|
9
|
|
|
|
|
10
|
|
|
|
|
11
|
|
|
namespace Aimeos\Shop\Controller; |
|
12
|
|
|
|
|
13
|
|
|
use Neos\Flow\Annotations as Flow; |
|
14
|
|
|
|
|
15
|
|
|
|
|
16
|
|
|
/** |
|
17
|
|
|
* Account controller |
|
18
|
|
|
* @package flow |
|
19
|
|
|
* @subpackage Controller |
|
20
|
|
|
*/ |
|
21
|
|
|
class AccountController extends AbstractController |
|
22
|
|
|
{ |
|
23
|
|
|
/** |
|
24
|
|
|
* Returns the output of the account favorite component |
|
25
|
|
|
* |
|
26
|
|
|
* @return string Rendered HTML for the body |
|
27
|
|
|
*/ |
|
28
|
|
|
public function favoriteComponentAction() |
|
29
|
|
|
{ |
|
30
|
|
|
$this->view->assign( 'output', $this->getOutput( 'account/favorite' ) ); |
|
31
|
|
|
} |
|
32
|
|
|
|
|
33
|
|
|
|
|
34
|
|
|
/** |
|
35
|
|
|
* Returns the output of the account history component |
|
36
|
|
|
* |
|
37
|
|
|
* @return string Rendered HTML for the body |
|
38
|
|
|
*/ |
|
39
|
|
|
public function historyComponentAction() |
|
40
|
|
|
{ |
|
41
|
|
|
$this->view->assign( 'output', $this->getOutput( 'account/history' ) ); |
|
42
|
|
|
} |
|
43
|
|
|
|
|
44
|
|
|
|
|
45
|
|
|
/** |
|
46
|
|
|
* Returns the output of the account profile component |
|
47
|
|
|
* |
|
48
|
|
|
* @return string Rendered HTML for the body |
|
49
|
|
|
*/ |
|
50
|
|
|
public function profileComponentAction() |
|
51
|
|
|
{ |
|
52
|
|
|
$this->view->assign( 'output', $this->getOutput( 'account/profile' ) ); |
|
53
|
|
|
} |
|
54
|
|
|
|
|
55
|
|
|
|
|
56
|
|
|
/** |
|
57
|
|
|
* Returns the output of the account watch component |
|
58
|
|
|
* |
|
59
|
|
|
* @return string Rendered HTML for the body |
|
60
|
|
|
*/ |
|
61
|
|
|
public function watchComponentAction() |
|
62
|
|
|
{ |
|
63
|
|
|
$this->view->assign( 'output', $this->getOutput( 'account/watch' ) ); |
|
64
|
|
|
} |
|
65
|
|
|
|
|
66
|
|
|
|
|
67
|
|
|
/** |
|
68
|
|
|
* Content for MyAccount page |
|
69
|
|
|
* |
|
70
|
|
|
* @Flow\Session(autoStart = TRUE) |
|
71
|
|
|
*/ |
|
72
|
|
|
public function indexAction() |
|
73
|
|
|
{ |
|
74
|
|
|
$this->view->assignMultiple( $this->get( 'account-index' ) ); |
|
75
|
|
|
} |
|
76
|
|
|
|
|
77
|
|
|
|
|
78
|
|
|
/** |
|
79
|
|
|
* Content for MyAccount download page |
|
80
|
|
|
* |
|
81
|
|
|
* @Flow\Session(autoStart = TRUE) |
|
82
|
|
|
*/ |
|
83
|
|
|
public function downloadAction() |
|
84
|
|
|
{ |
|
85
|
|
|
$context = $this->context->get( $this->request ); |
|
86
|
|
|
$langid = $context->getLocale()->getLanguageId(); |
|
87
|
|
|
|
|
88
|
|
|
$view = $this->viewContainer->create( $context, $this->uriBuilder, array(), $this->request, $langid ); |
|
89
|
|
|
$context->setView( $view ); |
|
90
|
|
|
|
|
91
|
|
|
$client = \Aimeos\Client\Html::create( $context, 'account/download' ); |
|
92
|
|
|
$client->setView( $view ); |
|
93
|
|
|
$client->process(); |
|
94
|
|
|
|
|
95
|
|
|
$response = $view->response(); |
|
96
|
|
|
$this->response->setStatus( $response->getStatusCode() ); |
|
97
|
|
|
|
|
98
|
|
|
foreach( $response->getHeaders() as $key => $value ) { |
|
99
|
|
|
$this->response->setHeader( $key, $value ); |
|
100
|
|
|
} |
|
101
|
|
|
|
|
102
|
|
|
return $this->response; |
|
103
|
|
|
} |
|
104
|
|
|
} |
|
105
|
|
|
|