-
Notifications
You must be signed in to change notification settings - Fork 3
/
Main.php
44 lines (32 loc) · 1.54 KB
/
Main.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
namespace IdnoPlugins\Event {
class Main extends \Idno\Common\Plugin
{
function registerPages()
{
// Events
\Idno\Core\Idno::site()->routes()->addRoute('/event/edit/?', '\IdnoPlugins\Event\Pages\Edit');
\Idno\Core\Idno::site()->routes()->addRoute('/event/edit/:id/?', '\IdnoPlugins\Event\Pages\Edit');
\Idno\Core\Idno::site()->routes()->addRoute('/event/delete/:id/?', '\IdnoPlugins\Event\Pages\Delete');
\Idno\Core\Idno::site()->routes()->addRoute('/event/:id/.*', '\Idno\Pages\Entity\View');
// RSVPs
\Idno\Core\Idno::site()->routes()->addRoute('/rsvp/edit/?', '\IdnoPlugins\Event\Pages\RSVP\Edit');
\Idno\Core\Idno::site()->routes()->addRoute('/rsvp/edit/:id/?', '\IdnoPlugins\Event\Pages\RSVP\Edit');
\Idno\Core\Idno::site()->routes()->addRoute('/rsvp/delete/:id/?', '\IdnoPlugins\Event\Pages\RSVP\Delete');
\Idno\Core\Idno::site()->routes()->addRoute('/rsvp/:id/.*', '\Idno\Pages\Entity\View');
}
function registerContentTypes()
{
\Idno\Common\ContentType::register('\IdnoPlugins\Event\ContentType');
\Idno\Common\ContentType::register('\IdnoPlugins\Event\RSVPContentType');
}
function registerTranslations()
{
\Idno\Core\Idno::site()->language()->register(
new \Idno\Core\GetTextTranslation(
'event', dirname(__FILE__) . '/languages/'
)
);
}
}
}