Initial commit
This commit is contained in:
84
app/plugins/calendar/plugin.php
Normal file
84
app/plugins/calendar/plugin.php
Normal file
@ -0,0 +1,84 @@
|
||||
<?php
|
||||
/**
|
||||
* app/plugins/calendar/plugin.php
|
||||
*
|
||||
* This houses all of the main plugin info and functionality.
|
||||
*
|
||||
* @package TP Calendar
|
||||
* @version 3.0
|
||||
* @author Joey Kimsey <Joey@thetempusproject.com>
|
||||
* @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 );
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user