Completed
Pull Request — master (#99)
by De Cramer
02:42
created

WidgetFactoryContext   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 47
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 47
rs 10
ccs 0
cts 20
cp 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 13 1
A getTranslationsHelper() 0 4 1
A getUiFactory() 0 4 1
1
<?php
2
3
4
namespace eXpansion\Framework\Core\Model\Gui;
5
6
use eXpansion\Framework\Core\Helpers\Translations;
7
use eXpansion\Framework\Core\Plugins\Gui\ActionFactory;
8
use eXpansion\Framework\Core\Plugins\GuiHandler;
9
use eXpansion\Framework\Core\Plugins\UserGroups\Factory;
10
use \eXpansion\Framework\Gui\Ui\Factory as UiFactory;
11
12
13
/**
14
 * Class WidgetFactoryContext
15
 *
16
 * @package eXpansion\Framework\Core\Model\Gui;
17
 * @author  oliver de Cramer <[email protected]>
18
 */
19
class WidgetFactoryContext extends ManialinkFactoryContext
20
{
21
    /** @var Translations */
22
    protected $translationsHelper;
23
24
    /** @var UiFactory  */
25
    protected $uiFactory;
26
27
    /**
28
     * WidgetFactoryContext constructor.
29
     *
30
     * @param               $className
31
     * @param GuiHandler    $guiHandler
32
     * @param Factory       $groupFactory
33
     * @param ActionFactory $actionFactory
34
     * @param Translations  $translations
35
     */
36
    public function __construct(
37
        $className,
38
        GuiHandler $guiHandler,
39
        Factory $groupFactory,
40
        ActionFactory $actionFactory,
41
        Translations $translations,
42
        UiFactory $uiFactory
43
    ) {
44
        parent::__construct($className, $guiHandler, $groupFactory, $actionFactory);
45
46
        $this->translationsHelper = $translations;
47
        $this->uiFactory = $uiFactory;
48
    }
49
50
    /**
51
     * @return Translations
52
     */
53
    public function getTranslationsHelper()
54
    {
55
        return $this->translationsHelper;
56
    }
57
58
    /**
59
     * @return UiFactory
60
     */
61
    public function getUiFactory()
62
    {
63
        return $this->uiFactory;
64
    }
65
}