Download the PHP package funayaki/cakephp-calendar without Composer
On this page you can find all versions of the php package funayaki/cakephp-calendar. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package cakephp-calendar
CakePHP Calendar plugin
A plugin to render simple calendars.
This branch is for CakePHP 3.5+.
Features
- Simple and robust
- No JS needed, more responsive than solutions like fullcalendar
- Persistent
year/month
URL pieces (copy-paste and link/redirect friendly)
Demo
See the demo Calendar example at the sandbox.
Setup
Then make sure the plugin is loaded in bootstrap:
You can also just manually put this in:
Usage
Load the component in your controller:
And also your helper in the View class:
Your action:
In your index template:
And in your view template you can have a backlink as easy as:
It will redirect back to the current year and month this calendar item has been linked from. So you have a persistent calendar - even with some clicking around, the user will still be able to navigate very easily through the calendar items.
Multi-day events
In case you have a beginning and end for dates, and those can span over multiple days, use:
Configuration
Integrity
The component validates both year and month input and throws 404 exception for invalid ones.
The component has a max limit in each direction, defined by init() call:
This will allow the calendar to work 5 years in both directions. Out of bounds are 404 exceptions. The helper knows not to generate links for over the limit dates.
Presentation
You can configure the URL elements to contain the month either as number (default) or text.
When loading the helper, pass 'monthAsString' => true
for the textual option.