![]() |
Xataface Calendar Module 0.1
Full Calendar for Xataface
|
This interface defines the delegate class methods that are supported by the calendar module. This interface is not *real* it is only used for documentation purposes. More...
Public Member Functions | |
getColor (Dataface_Record $record) | |
Returns the foreground color for a record when it is rendered in the calendar. | |
getBgColor (Dataface_Record $record) | |
Returns the background color for a record when it is rendered in the calendar. | |
calendar__decorateEvent (Dataface_Record $record, array &$eventData) | |
Modifies the event data for a record just before it is sent to the calendar for rendering. The event data will be converted to JSON and returned to the calendar for rendering. This data follows the structure of, and will ultimately be wrapped by, the full calendar event object. |
This interface defines the delegate class methods that are supported by the calendar module. This interface is not *real* it is only used for documentation purposes.
Definition at line 14 of file DelegateClass.php.
calendar__decorateEvent | ( | Dataface_Record $ | record, |
array &$ | eventData | ||
) |
Modifies the event data for a record just before it is sent to the calendar for rendering. The event data will be converted to JSON and returned to the calendar for rendering. This data follows the structure of, and will ultimately be wrapped by, the full calendar event object.
$eventData
array should be passed by reference so that data can be modified in place.function calendar__decorateEvent(Dataface_Record $record, &$event){ if ( !$event['className'] ) $event['className'] = ''; $event['className'] .= 'event-for-tool-'.$record->val('tool_id'); }
getBgColor | ( | Dataface_Record $ | record | ) |
Returns the background color for a record when it is rendered in the calendar.
Dataface_Record | The record that is to be rendered. |
function getBgColor($record){ if ( $record->val('country') == 'Canada') return 'red'; else return 'rgb(0,0,255)'; }
getColor | ( | Dataface_Record $ | record | ) |
Returns the foreground color for a record when it is rendered in the calendar.
Dataface_Record | The record that is to be rendered. |
function getColor($record){ if ( $record->val('status') == 'Approved' ) return 'black'; else return '#ccc'; }