-
Notifications
You must be signed in to change notification settings - Fork 0
CI_Calendar
CodeIgniter Calendar Class
This class enables the creation of calendars
- Class name: CI_Calendar
- Namespace:
public mixed $template = ''
Calendar layout template
- Visibility: public
public array $replacements = array()
Replacements array for template
- Visibility: public
public string $start_day = 'sunday'
Day of the week to start the calendar on
- Visibility: public
public string $month_type = 'long'
How to display months
- Visibility: public
public string $day_type = 'abr'
How to display names of days
- Visibility: public
public boolean $show_next_prev = FALSE
Whether to show next/prev month links
- Visibility: public
public boolean $next_prev_url = ''
Url base to use for next/prev month links
- Visibility: public
public boolean $show_other_days = FALSE
Show days of other months
- Visibility: public
protected object $CI
CI Singleton
- Visibility: protected
void CI_Calendar::__construct(array $config)
Class constructor
Loads the calendar language file and sets the default time reference.
- Visibility: public
- $config array - <p>Calendar options</p>
\CI_Calendar CI_Calendar::initialize($config)
Initialize the user preferences
Accepts an associative array as input, containing display preferences
- Visibility: public
- $config mixed
string CI_Calendar::generate($year, $month, $data)
Generate the calendar
- Visibility: public
- $year mixed
- $month mixed
- $data mixed
string CI_Calendar::get_month_name($month)
Get Month Name
Generates a textual month name based on the numeric month provided.
- Visibility: public
- $month mixed
array CI_Calendar::get_day_names($day_type)
Get Day Names
Returns an array of day names (Sunday, Monday, etc.) based on the type. Options: long, short, abr
- Visibility: public
- $day_type mixed
array CI_Calendar::adjust_date($month, $year)
Adjust Date
This function makes sure that we have a valid month/year. For example, if you submit 13 as the month, the year will increment and the month will become January.
- Visibility: public
- $month mixed
- $year mixed
integer CI_Calendar::get_total_days($month, $year)
Total days in a given month
- Visibility: public
- $month mixed
- $year mixed
array CI_Calendar::default_template()
Set Default Template Data
This is used in the event that the user has not created their own template
- Visibility: public
\CI_Calendar CI_Calendar::parse_template()
Parse Template
Harvests the data within the template {pseudo-variables} used to display the calendar
- Visibility: public