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

WidgetFactoryContext::getTranslationsHelper()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
ccs 0
cts 4
cp 0
cc 1
eloc 2
nc 1
nop 0
crap 2
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
}