-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap.php
47 lines (41 loc) · 1.19 KB
/
bootstrap.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
44
45
46
47
<?php
class BlogBootstrap extends \Dsc\Bootstrap
{
protected $dir = __DIR__;
protected $namespace = 'Blog';
protected function preSite()
{
if (class_exists('\Search\Factory'))
{
\Search\Factory::registerSource(new \Search\Models\Source(array(
'id' => 'blog.posts',
'title' => 'Blog Posts',
'class' => '\Blog\Models\Posts'
)));
}
if (class_exists('\Modules\Factory'))
{
\Modules\Factory::registerPositions(array(
'blog-tag-cloud'
));
}
}
protected function preAdmin()
{
if (class_exists('\Modules\Factory'))
{
\Modules\Factory::registerPositions(array(
'blog-tag-cloud'
));
}
if (class_exists('\Search\Factory'))
{
\Search\Factory::registerSource(new \Search\Models\Source(array(
'id' => 'blog.posts',
'title' => 'Blog Posts',
'class' => '\Blog\Models\Posts'
)));
}
}
}
$app = new BlogBootstrap();