CalendarUtil Class Reference

Static Public Member Functions

static makeCalendarItemByModel (RedBeanModel $model, SavedCalendar $savedCalendar)
static getDateRangeType ()
static getStartDate ($dateRangeType)
static getEndDate ($dateRangeType)
static getUserSavedCalendars (User $user)
static processUserCalendarsAndMakeDataProviderForCombinedView ($myCalendarIds=null, $mySubscribedCalendarIds=null, $dateRangeType=null, $startDate=null, $endDate=null)
static getFullCalendarItems (CalendarItemsDataProvider $dataProvider)
static processCalendarItemsAndAddMoreEventsIfRequired ($fullCalendarItems)
static createMoreEventsCalendarItem ($fullCalItem, $key, $fullCalendarItems)
static compareCalendarItemsByDateTime ($firstDate, $secondDate)
static getFullCalendarFormattedDateTimeElement ($dateTime)
static getUsedCalendarColorsByUser (User $user, $modelClassName, $attributeName)
static getModalContainerId ()
static resolveAjaxOptionsForModalView ()
static registerSharedCalendarModalScript ($url, $selector)
static getUserSubscribedCalendars (User $user)
static makeCalendarItemsList ($data, $field, $itemClass, $type)
static getSharedCalendarOptions ($savedCalendarSubscriptionId)
static getSavedCalendarOptions ($calendarId)
static getCalendarItemsDataProvider (User $user)
static getUsersSubscribedForCalendar (SavedCalendar $subscribedCalendar)
static getCalendarSubscriberData (SavedCalendar $subscribedCalendar)
static registerSelectCalendarScript ($startDate, $endDate)
static getAlreadyUsedColorsByUser (User $user)
static setMyCalendarColor (SavedCalendar $savedCalendar, User $user)
static setSharedCalendarColor (SavedCalendarSubscription $sharedCalendar)
static processAndSaveColor ($calendar, $usedColors)
static registerSavedCalendarDeleteScript ($startDate, $endDate)
static registerCalendarUnsubscriptionScript ($startDate, $endDate)
static getModelAttributesForSelectedModule ($moduleClassName)
static makeComponentFormAndPopulateReportFromData ($componentFormsData, Report $report, $componentPrefix)
static saveCalendarWithSerializedData (Report $report, SavedCalendar $savedCalendar, $wizardFormPostData)
static resolveReportBySavedCalendarPostData ($type, $id=null, $postData)
static getAvailableModulesForCalendar ()
static getCalendarModulesClassNamesCurrentUserHasAccessTo ()
static processAndGetDataProviderForEventsData ($selectedMyCalendarIds=null, $selectedSharedCalendarIds=null, $startDate=null, $endDate=null, $dateRangeType=null, $isSticky=true)
static loadDefaultCalendars (User $user)
static populateSavedCalendar (User $user, $name, $moduleClassName, $startAttributeName, $endAttributeName= '')
static populateFiltersDataInModel (SavedCalendar $model, $data)
static processDataProviderAndGetCalendarItems (CalendarItemsDataProvider $dataProvider)
static populateDetailsUrlForCalendarItems ($items)

Detailed Description

Definition at line 37 of file CalendarUtil.php.


Member Function Documentation

static makeCalendarItemByModel ( RedBeanModel model,
SavedCalendar savedCalendar 
) [static]

Make calendar items by model.

Parameters:
RedBeanModel $model
SavedCalendar $savedCalendar
Returns:
CalendarItem

Definition at line 45 of file CalendarUtil.php.

static getDateRangeType (  )  [static]

Gets date range type.

Returns:
string

Definition at line 68 of file CalendarUtil.php.

static getStartDate ( dateRangeType  )  [static]

Gets start date.

Parameters:
string $dateRangeType
Returns:
string

Definition at line 78 of file CalendarUtil.php.

static getEndDate ( dateRangeType  )  [static]

Gets end date.

Parameters:
string $dateRangeType
Returns:
string

Definition at line 100 of file CalendarUtil.php.

static getUserSavedCalendars ( User user  )  [static]

Get saved calendars for user.

Parameters:
User $user
Returns:
array

Definition at line 127 of file CalendarUtil.php.

static processUserCalendarsAndMakeDataProviderForCombinedView ( myCalendarIds = null,
mySubscribedCalendarIds = null,
dateRangeType = null,
startDate = null,
endDate = null 
) [static]

Process user calendars and get data provider.

Parameters:
null|string $myCalendarIds
null|string $mySubscribedCalendarIds
null|string $dateRangeType
null|string $startDate
null|string $endDate
Returns:
CalendarItemsDataProvider

Definition at line 153 of file CalendarUtil.php.

static getFullCalendarItems ( CalendarItemsDataProvider dataProvider  )  [static]

Get full calendar items.

Parameters:
CalendarItemsDataProvider $dataProvider
Returns:
array

Definition at line 192 of file CalendarUtil.php.

static processCalendarItemsAndAddMoreEventsIfRequired ( fullCalendarItems  )  [static]

Process full calendar items and render more events button if required.

Parameters:
array $fullCalendarItems

Definition at line 202 of file CalendarUtil.php.

static createMoreEventsCalendarItem ( fullCalItem,
key,
fullCalendarItems 
) [static]

Create more events calendar item.

Parameters:
array $fullCalItem
Returns:
string

Definition at line 240 of file CalendarUtil.php.

static compareCalendarItemsByDateTime ( firstDate,
secondDate 
) [static]

Compare datetime.

Parameters:
array $firstDate
array $secondDate

Definition at line 257 of file CalendarUtil.php.

static getFullCalendarFormattedDateTimeElement ( dateTime  )  [static]

Gets full calendar formatted date time.

Parameters:
string $dateTime
Returns:
string formatted in datetime format required for full calendar widget

Definition at line 271 of file CalendarUtil.php.

static getUsedCalendarColorsByUser ( User user,
modelClassName,
attributeName 
) [static]

Gets used color by user.

Parameters:
User $user
string $modelClassName
string $attributeName
Returns:
array

Definition at line 303 of file CalendarUtil.php.

static getModalContainerId (  )  [static]
Returns:
string

Definition at line 338 of file CalendarUtil.php.

static resolveAjaxOptionsForModalView (  )  [static]
Returns:
array

Definition at line 346 of file CalendarUtil.php.

static registerSharedCalendarModalScript ( url,
selector 
) [static]

Register shared calendar modal script

Parameters:
string $url
string $selector
Returns:
string

Definition at line 359 of file CalendarUtil.php.

static getUserSubscribedCalendars ( User user  )  [static]

Get the calendars user has subscribed for.

Parameters:
User $user
Returns:
integer

Definition at line 385 of file CalendarUtil.php.

static makeCalendarItemsList ( data,
field,
itemClass,
type 
) [static]

Make calendar items list.

Parameters:
array $data
string $field
string $itemClass
string $type
Returns:
string

Definition at line 411 of file CalendarUtil.php.

static getSharedCalendarOptions ( savedCalendarSubscriptionId  )  [static]

Get shared calendar options.

Parameters:
int $savedCalendarSubscriptionId
Returns:
string

Definition at line 455 of file CalendarUtil.php.

static getSavedCalendarOptions ( calendarId  )  [static]

Get saved calendar options.

Parameters:
int $calendarId
Returns:
string

Definition at line 474 of file CalendarUtil.php.

static getCalendarItemsDataProvider ( User user  )  [static]

Get calendar items data provider.

Parameters:
User $user
Returns:
CalendarItemsDataProvider

Definition at line 498 of file CalendarUtil.php.

static getUsersSubscribedForCalendar ( SavedCalendar subscribedCalendar  )  [static]

Get users subscribed for calendar.

Parameters:
SavedCalendar $subscribedCalendar
Returns:
array

Definition at line 522 of file CalendarUtil.php.

static getCalendarSubscriberData ( SavedCalendar subscribedCalendar  )  [static]

Get shared calendar subscriber data.

Parameters:
SavedCalendar $subscribedCalendar
Returns:
string

Definition at line 550 of file CalendarUtil.php.

static registerSelectCalendarScript ( startDate,
endDate 
) [static]

Register script whick would be invoked on click of any calendar item in my calendars or shared calendars

Definition at line 571 of file CalendarUtil.php.

static getAlreadyUsedColorsByUser ( User user  )  [static]

Get already used colors by user.

Parameters:
User $user
Returns:
array

Definition at line 588 of file CalendarUtil.php.

static setMyCalendarColor ( SavedCalendar savedCalendar,
User user 
) [static]

Sets my calendar color.

Parameters:
User $user
SavedCalendar $savedCalendar

Definition at line 600 of file CalendarUtil.php.

static setSharedCalendarColor ( SavedCalendarSubscription sharedCalendar  )  [static]

Sets shared calendar color.

Parameters:
SavedCalendarSubscription $sharedCalendar

Definition at line 613 of file CalendarUtil.php.

static processAndSaveColor ( calendar,
usedColors 
) [static]

Process and save the color for the model.

Parameters:
SavedCalendar|SavedCalendarSubscription $calendar
array $usedColors

Definition at line 627 of file CalendarUtil.php.

static registerSavedCalendarDeleteScript ( startDate,
endDate 
) [static]

Register saved calendar delete script

Parameters:
string $startDate
string $endDate

Definition at line 643 of file CalendarUtil.php.

static registerCalendarUnsubscriptionScript ( startDate,
endDate 
) [static]

Registers calendar unsubscription script.

Parameters:
string $startDate
string $endDate

Definition at line 695 of file CalendarUtil.php.

static getModelAttributesForSelectedModule ( moduleClassName  )  [static]

Gets model attributes for selected module.

Parameters:
string $moduleClassName
Returns:
array

Definition at line 735 of file CalendarUtil.php.

static makeComponentFormAndPopulateReportFromData ( componentFormsData,
Report report,
componentPrefix 
) [static]

Makes component form and populate report from the data.

Parameters:
array $componentFormsData
Report $report
null|string $componentPrefix

Definition at line 757 of file CalendarUtil.php.

static saveCalendarWithSerializedData ( Report report,
SavedCalendar savedCalendar,
wizardFormPostData 
) [static]

Save calendar with serialized data.

Parameters:
Report $report
SavedCalendar $savedCalendar
array $wizardFormPostData
Exceptions:
FailedToSaveModelException 

Definition at line 784 of file CalendarUtil.php.

static resolveReportBySavedCalendarPostData ( type,
id = null,
postData 
) [static]

Resolve report by saved calendar post data.

Parameters:
string $type
int $id
array $postData
Returns:
Report

Definition at line 809 of file CalendarUtil.php.

static getAvailableModulesForCalendar (  )  [static]

Gets module class name and display labels.

Returns:
array

Definition at line 841 of file CalendarUtil.php.

static getCalendarModulesClassNamesCurrentUserHasAccessTo (  )  [static]
Returns:
array of module class names and display labels the current user has access to

Definition at line 855 of file CalendarUtil.php.

static processAndGetDataProviderForEventsData ( selectedMyCalendarIds = null,
selectedSharedCalendarIds = null,
startDate = null,
endDate = null,
dateRangeType = null,
isSticky = true 
) [static]

Process and get data provider for events data.

Parameters:
null|string $myCalendarIds
null|string $mySubscribedCalendarIds
null|string $dateRangeType
null|string $startDate
null|string $endDate
Returns:
CalendarItemsDataProvider

Definition at line 881 of file CalendarUtil.php.

static loadDefaultCalendars ( User user  )  [static]

Checks and load default calendars for the user.

Parameters:
User $user

Definition at line 911 of file CalendarUtil.php.

static populateSavedCalendar ( User user,
name,
moduleClassName,
startAttributeName,
endAttributeName = '' 
) [static]

Populate saved calendar module.

Parameters:
User $user
string $name
string $moduleClassName
string $startAttributeName
string $endAttributeName

Definition at line 929 of file CalendarUtil.php.

static populateFiltersDataInModel ( SavedCalendar model,
data 
) [static]

Populate filters data in model.

Parameters:
SavedCalendar $model
array $data

Definition at line 965 of file CalendarUtil.php.

static processDataProviderAndGetCalendarItems ( CalendarItemsDataProvider dataProvider  )  [static]

Process data provider and get calendar items.

Parameters:
CalendarItemsDataProvider $dataProvider
Returns:
boolean

Definition at line 990 of file CalendarUtil.php.

static populateDetailsUrlForCalendarItems ( items  )  [static]

Populate details url for calendar items.

Parameters:
array $items
Returns:
array

Definition at line 1027 of file CalendarUtil.php.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Sat May 27 07:10:23 2017