Create a thumbnail for each event in index view
This commit is contained in:
parent
1146e42c0f
commit
930b94be40
|
@ -18,10 +18,18 @@ class EventsController extends AppController {
|
||||||
* index method
|
* index method
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
|
* This also creates a thumbnail for each event.
|
||||||
*/
|
*/
|
||||||
public function index() {
|
public function index() {
|
||||||
$this->Event->recursive = -1;
|
$this->Event->recursive = -1;
|
||||||
$events = $this->Event->find('all');
|
$events = $this->Event->find('all');
|
||||||
|
|
||||||
|
foreach ($events as $key => $value) {
|
||||||
|
$thumbData = $this->createThumbnail($value['Event']['Id']);
|
||||||
|
$events[$key]['thumbData'] = $thumbData;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
$this->set(array(
|
$this->set(array(
|
||||||
'events' => $events,
|
'events' => $events,
|
||||||
'_serialize' => array('events')
|
'_serialize' => array('events')
|
||||||
|
|
Loading…
Reference in New Issue