diff options
Diffstat (limited to 'app/frontend/controls/CalendarGrid.php')
-rw-r--r-- | app/frontend/controls/CalendarGrid.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/app/frontend/controls/CalendarGrid.php b/app/frontend/controls/CalendarGrid.php index 4ebfacd..b168379 100644 --- a/app/frontend/controls/CalendarGrid.php +++ b/app/frontend/controls/CalendarGrid.php @@ -54,6 +54,20 @@ class CalendarGrid extends FacadeTemplateControl { $param->Item->Events->dataBind(); } + public function eventCreate($sender, $param) { + if (preg_match('/Item$/', $param->Item->ItemType)) { + $renderer = 'Dummy'; + if ($param->Item->Data) { + $renderer = $param->Item->Data->getRendererClass(); + } + $eventTemplate = Prado::createComponent( + 'Application.controls.grid.' . $renderer . 'GridElement' + ); + $eventTemplate->setData($param->Item->Data); + $param->Item->addParsedObject($eventTemplate); + } + } + } ?> |