CalendarEvents#

NAME#

Kernel::System::CalendarEvents - to manage calendar events

DESCRIPTION#

Global module for operations that bases on calendar events

PUBLIC INTERFACE#

new()#

Don’t use the constructor directly, use the ObjectManager instead:

my $CalendarEventsObject = $Kernel::OM->Get('Kernel::System::CalendarEvents');

Parse()#

Parses calendar events of specified data.

my $CalendarEventsData = $CalendarEventsObject->Parse(
    TicketID    => $Param{TicketID},
    ArticleID   => $Param{ArticleID},
    String      => $ArticleContent, # parse specified text content
    Attachments => { # parse attachments
        Data => {
            '4' => {
                'Disposition' => 'attachment',
                'ContentType' => 'text/calendar; charset=UTF-8; name="Some calendar name.ics"',
                'Filename'    => 'calendar.ics',
                'FilesizeRaw' => '949'
            },
            '1' => {
                'Disposition' => 'attachment',
                'ContentType' => 'text/calendar; charset=UTF-8; name="Some calendar name1.ics"',
                'Filename'    => 'calendar1.ics',
                'FilesizeRaw' => '2967'
            },
        },
        Type => "Article", # specify type of attachments
    },
    ToTimeZone => $UserTimeZone,
);

FindEvents()#

Finds supported calendar event from the string.

my $Result = $CalendarEventsObject->FindEvents(
    String => [
        {
            Content =>
                "Hello! You've got an invitation for a meeting:
                BEGIN:VCALENDAR
                ..
                END:VCALENDAR"
        }
    ],
    Attachments => [
        {
            Content =>
                "Hello! You've got an invitation for a meeting:
                BEGIN:VCALENDAR
                ..
                END:VCALENDAR"
        },
        {
            Content =>
                "Hello! You've got an invitation for a meeting:
                BEGIN:VCALENDAR
                ..
                END:VCALENDAR"
        },
        ..
    ],
);

BuildString()#

Builds string for data output.

my $OutputString = $CalendarEventsObject->BuildString(
    Data => {
      'Type'      => 'Recurrent', # required
      'Interval'  => '5',
      'ByDay'     => 'SU,TU,WE,TH,FR,SA',
      'AllDay'    => 1,
      'Frequency' => 'Weekly'
    },
    Type => 'Frequency',
);

_FrequencyStringMappingGet()#

Get frequency string mapping.

my $FrequencyStringMapping = $CalendarEventsObject->_FrequencyStringMappingGet();

_MonthsMappingGet()#

Get months mapping.

my $MonthsMapping = $CalendarEventsObject->_MonthsMappingGet();

_DaysMappingGet()#

Get days mapping

my $DaysMapping = $CalendarEventsObject->_DaysMappingGet();

_DaysOrderMappingGet()#

Get days order mapping

my $DaysOrderMapping = $CalendarEventsObject->_DaysOrderMappingGet();