* @link https://TheTempusProject.com * @license https://opensource.org/licenses/MIT [MIT LICENSE] */ namespace TheTempusProject\Plugins; use TheTempusProject\Classes\Plugin; use TheTempusProject\Models\Events; use TheTempusProject\Models\Calendars; use TheTempusProject\Houdini\Classes\Components; use TheTempusProject\Houdini\Classes\Template; class Calendar extends Plugin { public $pluginName = 'TP Calendar'; public $configName = 'calendar'; public $pluginAuthor = 'JoeyK'; public $pluginWebsite = 'https://TheTempusProject.com'; public $modelVersion = '1.0'; public $pluginVersion = '3.0'; public $pluginDescription = 'A simple plugin which adds a site wide calendar system.'; public $permissionMatrix = [ 'useCalendar' => [ 'pretty' => 'Can use the calendar feature', 'default' => false, ], 'createEvents' => [ 'pretty' => 'Can add events to calendars', 'default' => false, ], ]; public $main_links = [ [ 'text' => 'Calendar', 'url' => '{ROOT_URL}calendar/index', 'filter' => 'loggedin', ], ]; public $configMatrix = [ 'enabled' => [ 'type' => 'radio', 'pretty' => 'Enable Calendar.', 'default' => true, ], ]; public $preferenceMatrix = [ 'calendarPreference' => [ 'pretty' => 'Default Calendar View', 'type' => 'select', 'default' => 'byMonth', 'options' => [ 'Daily' => 'byDay', 'Weekly' => 'byWeek', 'Monthly' => 'byMonth', 'Yearly' => 'byYear', 'All Events' => 'events', ], ], 'weekStart' => [ 'pretty' => 'First day of the week for the Calendar', 'type' => 'select', 'default' => 'sunday', 'options' => [ 'Sunday' => '6', 'Monday' => '7', ], ], ]; public $events; public $calendars; public function __construct( $load = false ) { $this->events = new Events; $this->calendars = new Calendars; parent::__construct( $load ); } }