Conditions | 1 |
Paths | 1 |
Total Lines | 10 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
18 | public function index(SS_HTTPRequest $request) |
||
19 | { |
||
20 | $sortMethod = $request->postVar('type') . 'PopularAddons'; |
||
21 | $addons = HomeController::$sortMethod(5); |
||
22 | $body = $this->renderWith('PopularAddons', array('PopularAddons' => $addons)); |
||
23 | $response = new SS_HTTPResponse(); |
||
24 | $response->addHeader('Content-Type', 'application/json'); |
||
25 | $response->setBody(Convert::array2json(array('success' => true, 'body' => $body->getValue()))); |
||
26 | return $response; |
||
27 | } |
||
28 | } |
||
29 |