[Vtigercrm-developers] Shared Calendar

PlaymaN Tepes sshhocckk at gmail.com
Thu Nov 12 13:39:01 GMT 2015


All management / development around Calendar module is completely crazy.

2015-11-12 11:58 GMT+01:00 Alan Lord <alanslists at gmail.com>:

> I would like to add new records (custom modules) to the Shared Calendar
> list.
>
> But looking at the Calendar_Feed_Action class it appears to me that all of
> the types are hard-coded...
>
> switch ($type) {
>>         case 'Events': $this->pullEvents($start, $end,
>> $result,$userid,$color,$textColor); break;
>>         case 'Calendar': $this->pullTasks($start, $end,
>> $result,$color,$textColor); break;
>>         case 'Potentials': $this->pullPotentials($start, $end, $result,
>> $color, $textColor); break;
>>         case 'Contacts':
>>                 if($request->get('fieldname') == 'support_end_date') {
>>                         $this->pullContactsBySupportEndDate($start, $end,
>> $result, $color, $textColor);
>>                 }else{
>>                         $this->pullContactsByBirthday($start, $end,
>> $result, $color, $textColor);
>>                 }
>>                 break;
>>         case 'Invoice': $this->pullInvoice($start, $end, $result, $color,
>> $textColor); break;
>>         case 'MultipleEvents' : $this->pullMultipleEvents($start,$end,
>> $result,$request->get('mapping'));break;
>>         case 'Project': $this->pullProjects($start, $end, $result,
>> $color, $textColor); break;
>>         case 'ProjectTask': $this->pullProjectTasks($start, $end,
>> $result, $color, $textColor); break;
>> }
>>
>
> Is this _really_ the best way to do this? Why on earth are the pullModule
> functions in this class? They should be part of the target module's model
> somewhere. That way I could include a custom pullModule function in my own
> module's class files...
>
> Maybe I have misunderstood the way this works but if I create a new module
> that has date parameters in it, how am I supposed to be able to display it
> on the shared calendar?
>
> Thanks
>
> Al
>
> _______________________________________________
> http://www.vtiger.com/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20151112/6a6f0614/attachment.html>


More information about the vtigercrm-developers mailing list