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
|
|
|
* Aimeos catalog controller. |
18
|
|
|
* @package flow |
19
|
|
|
* @subpackage Controller |
20
|
|
|
*/ |
21
|
|
|
class CatalogController extends AbstractController |
22
|
|
|
{ |
23
|
|
|
/** |
24
|
|
|
* Returns the output of the catalog count component |
25
|
|
|
* |
26
|
|
|
* @return string Rendered HTML for the body |
27
|
|
|
*/ |
28
|
|
|
public function countComponentAction() |
29
|
|
|
{ |
30
|
|
|
$this->view->assign( 'output', $this->getOutput( 'catalog/count' ) ); |
31
|
|
|
$this->response->setHeader( 'Content-Type', 'application/javascript' ); |
|
|
|
|
32
|
|
|
$this->response->setHeader( 'Cache-Control', 'max-age=300' ); |
|
|
|
|
33
|
|
|
} |
34
|
|
|
|
35
|
|
|
|
36
|
|
|
/** |
37
|
|
|
* Returns the output of the catalog detail component |
38
|
|
|
* |
39
|
|
|
* @return string Rendered HTML for the body |
40
|
|
|
*/ |
41
|
|
|
public function detailComponentAction() |
42
|
|
|
{ |
43
|
|
|
$this->view->assign( 'output', $this->getOutput( 'catalog/detail' ) ); |
44
|
|
|
} |
45
|
|
|
|
46
|
|
|
|
47
|
|
|
/** |
48
|
|
|
* Returns the output of the catalog filter component |
49
|
|
|
* |
50
|
|
|
* @return string Rendered HTML for the body |
51
|
|
|
*/ |
52
|
|
|
public function filterComponentAction() |
53
|
|
|
{ |
54
|
|
|
$this->view->assign( 'output', $this->getOutput( 'catalog/filter' ) ); |
55
|
|
|
} |
56
|
|
|
|
57
|
|
|
|
58
|
|
|
/** |
59
|
|
|
* Returns the output of the catalog list component |
60
|
|
|
* |
61
|
|
|
* @return string Rendered HTML for the body |
62
|
|
|
*/ |
63
|
|
|
public function listComponentAction() |
64
|
|
|
{ |
65
|
|
|
$this->view->assign( 'output', $this->getOutput( 'catalog/lists' ) ); |
66
|
|
|
} |
67
|
|
|
|
68
|
|
|
|
69
|
|
|
/** |
70
|
|
|
* Returns the output of the catalog session component |
71
|
|
|
* |
72
|
|
|
* @return string Rendered HTML for the body |
73
|
|
|
*/ |
74
|
|
|
public function sessionComponentAction() |
75
|
|
|
{ |
76
|
|
|
$this->view->assign( 'output', $this->getOutput( 'catalog/session' ) ); |
77
|
|
|
} |
78
|
|
|
|
79
|
|
|
|
80
|
|
|
/** |
81
|
|
|
* Returns the output of the catalog stage component |
82
|
|
|
* |
83
|
|
|
* @return string Rendered HTML for the body |
84
|
|
|
*/ |
85
|
|
|
public function stageComponentAction() |
86
|
|
|
{ |
87
|
|
|
$this->view->assign( 'output', $this->getOutput( 'catalog/stage' ) ); |
88
|
|
|
} |
89
|
|
|
|
90
|
|
|
|
91
|
|
|
/** |
92
|
|
|
* Returns the output of the catalog stock component |
93
|
|
|
* |
94
|
|
|
* @return string Rendered HTML for the body |
95
|
|
|
*/ |
96
|
|
|
public function stockComponentAction() |
97
|
|
|
{ |
98
|
|
|
$this->view->assign( 'output', $this->getOutput( 'catalog/stock' ) ); |
99
|
|
|
$this->response->setHeader( 'Content-Type', 'application/javascript' ); |
|
|
|
|
100
|
|
|
$this->response->setHeader( 'Cache-Control', 'max-age=30' ); |
|
|
|
|
101
|
|
|
} |
102
|
|
|
|
103
|
|
|
|
104
|
|
|
/** |
105
|
|
|
* Returns the output of the catalog suggest component |
106
|
|
|
* |
107
|
|
|
* @return string Rendered HTML for the body |
108
|
|
|
*/ |
109
|
|
|
public function suggestComponentAction() |
110
|
|
|
{ |
111
|
|
|
$this->view->assign( 'output', $this->getOutput( 'catalog/suggest' ) ); |
112
|
|
|
$this->response->setHeader( 'Content-Type', 'application/json' ); |
|
|
|
|
113
|
|
|
} |
114
|
|
|
|
115
|
|
|
|
116
|
|
|
/** |
117
|
|
|
* Renders the catalog counts. |
118
|
|
|
*/ |
119
|
|
|
public function countAction() |
120
|
|
|
{ |
121
|
|
|
$this->view->assignMultiple( $this->getSections( 'catalog-count' ) ); |
122
|
|
|
$this->response->setHeader( 'Content-Type', 'application/javascript' ); |
|
|
|
|
123
|
|
|
$this->response->setHeader( 'Cache-Control', 'max-age=300' ); |
|
|
|
|
124
|
|
|
} |
125
|
|
|
|
126
|
|
|
|
127
|
|
|
/** |
128
|
|
|
* Content for catalog detail page |
129
|
|
|
* |
130
|
|
|
* @Flow\Session(autoStart = TRUE) |
131
|
|
|
*/ |
132
|
|
|
public function detailAction() |
133
|
|
|
{ |
134
|
|
|
$this->view->assignMultiple( $this->getSections( 'catalog-detail' ) ); |
135
|
|
|
} |
136
|
|
|
|
137
|
|
|
|
138
|
|
|
/** |
139
|
|
|
* Content for catalog list page |
140
|
|
|
* |
141
|
|
|
* @Flow\Session(autoStart = TRUE) |
142
|
|
|
*/ |
143
|
|
|
public function listAction() |
144
|
|
|
{ |
145
|
|
|
$this->view->assignMultiple( $this->getSections( 'catalog-list' ) ); |
146
|
|
|
} |
147
|
|
|
|
148
|
|
|
|
149
|
|
|
/** |
150
|
|
|
* Renders the catalog stock section. |
151
|
|
|
*/ |
152
|
|
|
public function stockAction() |
153
|
|
|
{ |
154
|
|
|
$this->view->assignMultiple( $this->getSections( 'catalog-stock' ) ); |
155
|
|
|
$this->response->setHeader( 'Content-Type', 'application/javascript' ); |
|
|
|
|
156
|
|
|
$this->response->setHeader( 'Cache-Control', 'max-age=30' ); |
|
|
|
|
157
|
|
|
} |
158
|
|
|
|
159
|
|
|
|
160
|
|
|
/** |
161
|
|
|
* Renders a list of product names in JSON format. |
162
|
|
|
*/ |
163
|
|
|
public function suggestAction() |
164
|
|
|
{ |
165
|
|
|
$this->view->assignMultiple( $this->getSections( 'catalog-suggest' ) ); |
166
|
|
|
$this->response->setHeader( 'Content-Type', 'application/json' ); |
|
|
|
|
167
|
|
|
} |
168
|
|
|
|
169
|
|
|
|
170
|
|
|
/** |
171
|
|
|
* Content for catalog tree page |
172
|
|
|
* |
173
|
|
|
* @Flow\Session(autoStart = TRUE) |
174
|
|
|
*/ |
175
|
|
|
public function treeAction() |
176
|
|
|
{ |
177
|
|
|
$this->view->assignMultiple( $this->getSections( 'catalog-tree' ) ); |
178
|
|
|
} |
179
|
|
|
} |
180
|
|
|
|
This method has been deprecated. The supplier of the class has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the method will be removed from the class and what other method or class to use instead.