forked from riotkit-org/federation-card
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.php
54 lines (49 loc) · 1.65 KB
/
config.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
48
49
50
51
52
53
54
<?php declare(strict_types=1);
require_once __DIR__ . '/vendor/autoload.php';
use App\Mechanism\Entity\Activity;
use App\Mechanism\Entity\Badge;
use App\Mechanism\Entity\Organization;
use App\Mechanism\Service\CollectionFactory;
use TightenCo\Jigsaw\Collection\CollectionItem;
return [
'build' => [
'source' => 'content',
'destination' => 'build_local',
],
'production' => false,
'baseUrl' => '',
'title' => 'Federation Card',
'description' => 'Website description.',
/**
* 1. Collect all files
* 2. Create models e.g. "Activity" or "Organization"
* 3. After all collections are bootstrapped by framework, then our "CollectionConnector" will join them together
* to create relations
*/
'collections' => [
'organizations' => [
'path' => 'organizations',
'sort' => 'name',
'items' => (new CollectionFactory('organizations'))->discover(),
'map' => function (CollectionItem $item) {
return Organization::fromItem($item);
}
],
'activities' => [
'path' => 'activities',
'sort' => 'name',
'items' => (new CollectionFactory('activities'))->discover(),
'map' => function (CollectionItem $item) {
return Activity::fromItem($item);
}
],
'badges' => [
'path' => 'badges',
'sort' => 'name',
'items' => (new CollectionFactory('badges'))->discover(),
'map' => function (CollectionItem $item) {
return Badge::fromItem($item);
}
],
],
];