dreamjob/lib/Cake/Test/test_app/View/Posts/json/index.ctp

15 lines
311 B
Plaintext
Raw Normal View History

2015-03-31 14:49:03 +02:00
<?php
$paging = isset($this->Paginator->options['url']) ? $this->Paginator->options['url'] : null;
$formatted = array(
'user' => $user['User']['username'],
'list' => array(),
'paging' => $paging,
);
foreach ($user['Item'] as $item) {
$formatted['list'][] = $item['name'];
}
echo json_encode($formatted);