WbmTemplateManager::build()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 6
rs 9.4285
c 1
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
/**
3
 * Template Manager
4
 * Copyright (c) Webmatch GmbH
5
 *
6
 * This program is free software: you can redistribute it and/or modify
7
 * it under the terms of the GNU General Public License as published by
8
 * the Free Software Foundation, either version 3 of the License, or
9
 * (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 */
16
17
namespace WbmTemplateManager;
18
19
use Symfony\Component\DependencyInjection\ContainerBuilder;
20
use Shopware\Components\Plugin\Context\ActivateContext;
21
use Shopware\Components\Plugin\Context\InstallContext;
22
use Shopware\Components\Plugin\Context\UpdateContext;
23
24
/**
25
 * Class WbmTemplateManager
26
 * @package WbmTemplateManager
27
 */
28
class WbmTemplateManager extends \Shopware\Components\Plugin
29
{
30
    /**
31
     * @param ContainerBuilder $container
32
     */
33
    public function build(ContainerBuilder $container)
34
    {
35
        $container->setParameter('wbm_template_manager.plugin_dir', $this->getPath());
36
37
        parent::build($container);
38
    }
39
40
    /**
41
     * @param InstallContext $context
42
     */
43
    public function install(InstallContext $context)
44
    {
45
        parent::install($context);
46
    }
47
48
    /**
49
     * @param ActivateContext $context
50
     */
51
    public function activate(ActivateContext $context)
52
    {
53
        $context->scheduleClearCache(InstallContext::CACHE_LIST_ALL);
54
    }
55
56
    /**
57
     * @param UpdateContext $context
58
     */
59
    public function update(UpdateContext $context)
60
    {
61
        $context->scheduleClearCache(InstallContext::CACHE_LIST_ALL);
62
    }
63
}