CalendarItemsDataProvider Class Reference

Public Member Functions

 __construct (SavedCalendarSubscriptions $savedCalendarSubscriptions, array $config=array())
 calculateTotalItemCount ()
 getData ($refresh=false)
 getModuleClassName ()
 getStartDate ()
 getEndDate ()
 setModuleClassName ($moduleClassName)
 getSavedCalendarSubscriptions ()
 setSavedCalendarSubscriptions ($savedCalendarSubscriptions)
 getDateRangeType ()
 setDateRangeType ($dateRangeType)
 getIsMaxCountReached ()
 setIsMaxCountReached ($isMaxCountReached)

Data Fields

const MAXIMUM_CALENDAR_ITEMS_COUNT = 200
const MAXIMUM_CALENDAR_ITEMS_DISPLAYED_FOR_ANY_DATE = 5

Protected Member Functions

 fetchData ()
 fetchKeys ()
 resolveCalendarItems ()
 resolveRedBeanModelsByCalendar (SavedCalendar $calendar)
 makeReportBySavedCalendar (SavedCalendar $savedCalendar)
 resolveRedBeanModelsToCalendarItems (&$calendarItems, array $models, SavedCalendar $savedCalendar)

Protected Attributes

 $savedCalendarSubscriptions
 $moduleClassName
 $savedCalendar
 $startDate
 $endDate
 $dateRangeType

Detailed Description

Data provider for calendar items.

Definition at line 39 of file CalendarItemsDataProvider.php.


Constructor & Destructor Documentation

__construct ( SavedCalendarSubscriptions savedCalendarSubscriptions,
array $  config = array() 
)
Parameters:
SavedCalendarSubscriptions $savedCalendarSubscriptions
array $config

Definition at line 94 of file CalendarItemsDataProvider.php.


Member Function Documentation

calculateTotalItemCount (  ) 

Calculates total item count.

Returns:
int

Definition at line 111 of file CalendarItemsDataProvider.php.

getData ( refresh = false  ) 

Override so when refresh is true it resets _calendarItemsData

Definition at line 119 of file CalendarItemsDataProvider.php.

fetchData (  )  [protected]

Fetches data.

Returns:
array

Definition at line 137 of file CalendarItemsDataProvider.php.

fetchKeys (  )  [protected]

Fetches keys for data items.

Returns:
array

Definition at line 146 of file CalendarItemsDataProvider.php.

resolveCalendarItems (  )  [protected]

Resolve calendar items.

Returns:
array

Definition at line 160 of file CalendarItemsDataProvider.php.

resolveRedBeanModelsByCalendar ( SavedCalendar calendar  )  [protected]

Resolve redbean models by calendar.

Parameters:
SavedCalendar $calendar
Returns:
array

Definition at line 189 of file CalendarItemsDataProvider.php.

makeReportBySavedCalendar ( SavedCalendar savedCalendar  )  [protected]

Makes report by saved calendar.

Parameters:
SavedCalendar $savedCalendar
Returns:
Report

Definition at line 213 of file CalendarItemsDataProvider.php.

resolveRedBeanModelsToCalendarItems ( &$  calendarItems,
array $  models,
SavedCalendar savedCalendar 
) [protected]

Get the list of calendar items

Parameters:
array $calendarItems
array $models
SavedCalendar $savedCalendar

Definition at line 258 of file CalendarItemsDataProvider.php.

getModuleClassName (  ) 
Returns:
string

Definition at line 269 of file CalendarItemsDataProvider.php.

getStartDate (  ) 
Returns:
string

Definition at line 277 of file CalendarItemsDataProvider.php.

getEndDate (  ) 
Returns:
string

Definition at line 285 of file CalendarItemsDataProvider.php.

setModuleClassName ( moduleClassName  ) 
Parameters:
string $moduleClassName

Definition at line 293 of file CalendarItemsDataProvider.php.

getSavedCalendarSubscriptions (  ) 
Returns:
array

Definition at line 301 of file CalendarItemsDataProvider.php.

setSavedCalendarSubscriptions ( savedCalendarSubscriptions  ) 
Parameters:
array $savedCalendarSubscriptions

Definition at line 309 of file CalendarItemsDataProvider.php.

getDateRangeType (  ) 
Returns:
string

Definition at line 317 of file CalendarItemsDataProvider.php.

setDateRangeType ( dateRangeType  ) 
Parameters:
string $dateRangeType

Definition at line 325 of file CalendarItemsDataProvider.php.

getIsMaxCountReached (  ) 
Returns:
bool

Definition at line 333 of file CalendarItemsDataProvider.php.

setIsMaxCountReached ( isMaxCountReached  ) 

Sets is max count reached

Parameters:
bool $isMaxCountReached

Definition at line 342 of file CalendarItemsDataProvider.php.


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