Completed
Push — master ( e24f70...fc9daa )
by WEBEWEB
01:56
created

FOSUserBreadcrumbNodes   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 34
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getFontAwesomeBreadcrumbNodes() 0 10 1
A getMaterialDesignIconicFontBreadcrumbNodes() 0 10 1
1
<?php
2
3
/*
4
 * This file is part of the core-bundle package.
5
 *
6
 * (c) 2019 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\Navigation;
13
14
/**
15
 * FOSUser breadcrumb nodes.
16
 *
17
 * @author webeweb <https://github.com/webeweb/>
18
 * @package WBW\Bundle\CoreBundle\Navigation
19
 */
20
class FOSUserBreadcrumbNodes {
21
22
    /**
23
     * Get a FOSUser breadcrumb node with Font Awesome icons.
24
     *
25
     * @return BreadcrumbNode[] Returns the FOSUser breadcrumb node.
26
     */
27
    public static function getFontAwesomeBreadcrumbNodes() {
28
29
        $breadcrumbNodes = [];
30
31
        $breadcrumbNodes[] = new BreadcrumbNode("label.edit_profile", "fa:user", "fos_user_profile_edit", NavigationInterface::NAVIGATION_MATCHER_ROUTER);
32
        $breadcrumbNodes[] = new BreadcrumbNode("label.show_profile", "fa:user", "fos_user_profile_show", NavigationInterface::NAVIGATION_MATCHER_ROUTER);
33
        $breadcrumbNodes[] = new BreadcrumbNode("label.change_password", "fa:lock", "fos_user_change_password", NavigationInterface::NAVIGATION_MATCHER_ROUTER);
34
35
        return $breadcrumbNodes;
36
    }
37
38
    /**
39
     * Get a FOSUser breadcrumb node with Material Design Iconic Font icons.
40
     *
41
     * @return BreadcrumbNode[] Returns the FOSUser breadcrumb node.
42
     */
43
    public static function getMaterialDesignIconicFontBreadcrumbNodes() {
44
45
        $breadcrumbNodes = [];
46
47
        $breadcrumbNodes[] = new BreadcrumbNode("label.edit_profile", "zmdi:account", "fos_user_profile_edit", NavigationInterface::NAVIGATION_MATCHER_ROUTER);
48
        $breadcrumbNodes[] = new BreadcrumbNode("label.show_profile", "zmdi:account", "fos_user_profile_show", NavigationInterface::NAVIGATION_MATCHER_ROUTER);
49
        $breadcrumbNodes[] = new BreadcrumbNode("label.change_password", "zmdi:lock", "fos_user_change_password", NavigationInterface::NAVIGATION_MATCHER_ROUTER);
50
51
        return $breadcrumbNodes;
52
    }
53
}
54