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
|
||||
*
|
||||
* @return void
|
||||
* This also creates a thumbnail for each event.
|
||||
*/
|
||||
public function index() {
|
||||
$this->Event->recursive = -1;
|
||||
$events = $this->Event->find('all');
|
||||
|
||||
foreach ($events as $key => $value) {
|
||||
$thumbData = $this->createThumbnail($value['Event']['Id']);
|
||||
$events[$key]['thumbData'] = $thumbData;
|
||||
|
||||
}
|
||||
|
||||
$this->set(array(
|
||||
'events' => $events,
|
||||
'_serialize' => array('events')
|
||||
|
|
Loading…
Reference in New Issue