Completed
Push — master ( 77ffb4...af9241 )
by WEBEWEB
01:34
created

ThemeManager::getTasksDropDownThemeProvider()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
/**
4
 * This file is part of the core-bundle package.
5
 *
6
 * (c) 2018 WEBEWEB
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace WBW\Bundle\CoreBundle\Manager;
13
14
use WBW\Bundle\CoreBundle\Provider\Theme\ApplicationThemeProviderInterface;
15
use WBW\Bundle\CoreBundle\Provider\Theme\BreadcrumbsThemeProviderInterface;
16
use WBW\Bundle\CoreBundle\Provider\Theme\FooterThemeProviderInterface;
17
use WBW\Bundle\CoreBundle\Provider\Theme\HookDropDownThemeProviderInterface;
18
use WBW\Bundle\CoreBundle\Provider\Theme\NavigationThemeProviderInterface;
19
use WBW\Bundle\CoreBundle\Provider\Theme\NotificationsDropDownThemeProviderInterface;
20
use WBW\Bundle\CoreBundle\Provider\Theme\SearchThemeProviderInterface;
21
use WBW\Bundle\CoreBundle\Provider\Theme\TasksDropDownThemeProviderInterface;
22
use WBW\Bundle\CoreBundle\Provider\Theme\UserInfoThemeProviderInterface;
23
use WBW\Library\Core\Argument\ObjectHelper;
24
25
/**
26
 * Theme manager.
27
 *
28
 * @author webeweb <https://github.com/webeweb/>
29
 * @package WBW\Bundle\CoreBundle\Manager
30
 */
31
class ThemeManager extends AbstractThemeManager {
32
33
    /**
34
     * Service name.
35
     *
36
     * @var string
37
     */
38
    const SERVICE_NAME = "webeweb.core.manager.theme";
39
40
    /**
41
     * Get the application theme provider.
42
     *
43
     * @return ApplicationThemeProviderInterface Returns the application theme provider.
44
     */
45
    public function getApplicationThemeProvider() {
46
        return $this->getProvider(ApplicationThemeProviderInterface::class);
47
    }
48
49
    /**
50
     * Get the breadcrumbs theme provider.
51
     *
52
     * @return BreadcrumbsThemeProviderInterface Returns the breadcrumbs theme provider.
53
     */
54
    public function getBreadcrumbsThemeProvider() {
55
        return $this->getProvider(BreadcrumbsThemeProviderInterface::class);
56
    }
57
58
    /**
59
     * Get the footer theme provider.
60
     *
61
     * @return FooterThemeProviderInterface Returns the footer theme provider.
62
     */
63
    public function getFooterThemeProvider() {
64
        return $this->getProvider(FooterThemeProviderInterface::class);
65
    }
66
67
    /**
68
     * Get the hook drop down theme provider.
69
     *
70
     * @return HookDropDownThemeProviderInterface Returns the hook drop down theme provider.
71
     */
72
    public function getHookDropDownThemeProvider() {
73
        return $this->getProvider(HookDropDownThemeProviderInterface::class);
74
    }
75
76
    /**
77
     * Get the navigation theme provider.
78
     *
79
     * @return NavigationThemeProviderInterface Returns the navigation theme provider.
80
     */
81
    public function getNavigationThemeProvider() {
82
        return $this->getProvider(NavigationThemeProviderInterface::class);
83
    }
84
85
    /**
86
     * Get the notifications drop down theme provider.
87
     *
88
     * @return NotificationsDropDownThemeProviderInterface Returns the Notifications drop down theme provider.
89
     */
90
    public function getNotificationsDropDownThemeProvider() {
91
        return $this->getProvider(NotificationsDropDownThemeProviderInterface::class);
92
    }
93
94
    /**
95
     * Get the search theme provider.
96
     *
97
     * @return SearchThemeProviderInterface Returns the search theme provider.
98
     */
99
    public function getSearchThemeProvider() {
100
        return $this->getProvider(SearchThemeProviderInterface::class);
101
    }
102
103
    /**
104
     * Get the tasks drop down theme provider.
105
     *
106
     * @return TasksDropDownThemeProviderInterface Returns the tasks drop down theme provider.
107
     */
108
    public function getTasksDropDownThemeProvider() {
109
        return $this->getProvider(TasksDropDownThemeProviderInterface::class);
110
    }
111
112
    /**
113
     * Get the user info theme provider.
114
     *
115
     * @return UserInfoThemeProviderInterface Returns the user info theme provider.
116
     */
117
    public function getUserInfoThemeProvider() {
118
        return $this->getProvider(UserInfoThemeProviderInterface::class);
119
    }
120
121
    /**
122
     * {@inheritdoc}
123
     */
124
    protected function initIndex() {
125
        return [
126
            ObjectHelper::getShortName(ApplicationThemeProviderInterface::class)           => null,
127
            ObjectHelper::getShortName(BreadcrumbsThemeProviderInterface::class)           => null,
128
            ObjectHelper::getShortName(FooterThemeProviderInterface::class)                => null,
129
            ObjectHelper::getShortName(HookDropDownThemeProviderInterface::class)          => null,
130
            ObjectHelper::getShortName(NavigationThemeProviderInterface::class)            => null,
131
            ObjectHelper::getShortName(NotificationsDropDownThemeProviderInterface::class) => null,
132
            ObjectHelper::getShortName(SearchThemeProviderInterface::class)                => null,
133
            ObjectHelper::getShortName(TasksDropDownThemeProviderInterface::class)         => null,
134
            ObjectHelper::getShortName(UserInfoThemeProviderInterface::class)              => null,
135
        ];
136
    }
137
138
    /**
139
     * Set the application theme provider.
140
     *
141
     * @param ApplicationThemeProviderInterface $provider The application theme provider.
142
     * @return ManagerInterface Returns this manager.
143
     */
144
    public function setApplicationThemeProvider(ApplicationThemeProviderInterface $provider) {
145
        $this->setProvider(ApplicationThemeProviderInterface::class, $provider);
146
        return $this;
147
    }
148
149
    /**
150
     * Set the breadcrumbs theme provider.
151
     *
152
     * @param BreadcrumbsThemeProviderInterface $provider The breadcrumbs theme provider.
153
     * @return ManagerInterface Returns this manager.
154
     */
155
    public function setBreadcrumbsThemeProvider(BreadcrumbsThemeProviderInterface $provider) {
156
        $this->setProvider(BreadcrumbsThemeProviderInterface::class, $provider);
157
        return $this;
158
    }
159
160
    /**
161
     * Set the footer theme provider.
162
     *
163
     * @param FooterThemeProviderInterface $provider The footer theme provider.
164
     * @return ManagerInterface Returns this manager.
165
     */
166
    public function setFooterThemeProvider(FooterThemeProviderInterface $provider) {
167
        $this->setProvider(FooterThemeProviderInterface::class, $provider);
168
        return $this;
169
    }
170
171
    /**
172
     * Set the hook drop down theme provider.
173
     *
174
     * @param HookDropDownThemeProviderInterface $provider The hook drop down theme provider.
175
     * @return ManagerInterface Returns this manager.
176
     */
177
    public function setHookDropDownThemeProvider(HookDropDownThemeProviderInterface $provider) {
178
        $this->setProvider(HookDropDownThemeProviderInterface::class, $provider);
179
        return $this;
180
    }
181
182
    /**
183
     * Set the navigation theme provider.
184
     *
185
     * @param NavigationThemeProviderInterface $provider The navigation theme provider.
186
     * @return ManagerInterface Returns this manager.
187
     */
188
    public function setNavigationThemeProvider(NavigationThemeProviderInterface $provider) {
189
        $this->setProvider(NavigationThemeProviderInterface::class, $provider);
190
        return $this;
191
    }
192
193
    /**
194
     * Set the notifications drop down theme provider.
195
     *
196
     * @param NotificationsDropDownThemeProviderInterface $provider The notifications drop down theme provider.
197
     * @return ManagerInterface Returns this manager.
198
     */
199
    public function setNotificationsDropDownThemeProvider(NotificationsDropDownThemeProviderInterface $provider) {
200
        $this->setProvider(NotificationsDropDownThemeProviderInterface::class, $provider);
201
        return $this;
202
    }
203
204
    /**
205
     * Set the search theme provider.
206
     *
207
     * @param SearchThemeProviderInterface $provider The search theme provider.
208
     * @return ManagerInterface Returns this manager.
209
     */
210
    public function setSearchThemeProvider(SearchThemeProviderInterface $provider) {
211
        $this->setProvider(SearchThemeProviderInterface::class, $provider);
212
        return $this;
213
    }
214
215
    /**
216
     * Set the tasks drop down theme provider.
217
     *
218
     * @param TasksDropDownThemeProviderInterface $provider The tasks drop down theme provider.
219
     * @return ManagerInterface Returns this manager.
220
     */
221
    public function setTasksDropDownThemeProvider(TasksDropDownThemeProviderInterface $provider) {
222
        $this->setProvider(TasksDropDownThemeProviderInterface::class, $provider);
223
        return $this;
224
    }
225
226
    /**
227
     * Set the user info theme provider.
228
     *
229
     * @param UserInfoThemeProviderInterface $provider The user info theme provider.
230
     * @return ManagerInterface Returns this manager.
231
     */
232
    public function setUserInfoThemeProvider(UserInfoThemeProviderInterface $provider) {
233
        $this->setProvider(UserInfoThemeProviderInterface::class, $provider);
234
        return $this;
235
    }
236
237
}
238