-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathAnalyticsPackage.php
More file actions
57 lines (49 loc) · 1.27 KB
/
AnalyticsPackage.php
File metadata and controls
57 lines (49 loc) · 1.27 KB
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
55
56
57
<?php
namespace Dms\Package\Analytics;
use Dms\Core\ICms;
use Dms\Core\Ioc\IIocContainer;
use Dms\Core\Package\Definition\PackageDefinition;
use Dms\Core\Package\Package;
use Dms\Package\Analytics\Persistence\DbAnalyticsDriverConfigRepository;
/**
* The analytics package
*
* @author Elliot Levin <elliotlevin@hotmail.com>
*/
class AnalyticsPackage extends Package
{
/**
* Boots the package
*
* @param ICms $cms
*
* @return void
*/
public static function boot(ICms $cms)
{
$cms->getLang()->addResourceDirectory('package.analytics', __DIR__ . '/../resources/lang/');
$cms->getIocContainer()->bind(
IIocContainer::SCOPE_SINGLETON,
IAnalyticsDriverConfigRepository::class, DbAnalyticsDriverConfigRepository::class
);
}
/**
* Defines the structure of this cms package.
*
* @param PackageDefinition $package
*
* @return void
*/
protected function define(PackageDefinition $package)
{
$package->name('analytics');
$package->metadata([
'icon' => 'globe'
]);
$package->dashboard()
->widgets(['config.*']);
$package->modules([
'config' => AnalyticsConfigModule::class
]);
}
}