Completed
Pull Request — master (#39)
by Phecho
05:53
created

ProfilesController::store()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 1
nc 1
nop 1
1
<?php
2
3
/*
4
 * This file is part of Gitamin.
5
 * 
6
 * Copyright (C) 2015-2016 The Gitamin Team
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 Gitamin\Http\Controllers;
13
14
use Illuminate\Support\Facades\View;
15
16
class ProfilesController extends Controller
17
{
18
    /**
19
     * Array of sub-menu items.
20
     *
21
     * @var array
22
     */
23
    protected $subMenu = [];
24
25
    /**
26
     * Creates a new project controller instance.
27
     *
28
     * @return void
0 ignored issues
show
Comprehensibility Best Practice introduced by
Adding a @return annotation to constructors is generally not recommended as a constructor does not have a meaningful return value.

Adding a @return annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.

Please refer to the PHP core documentation on constructors.

Loading history...
29
     */
30
    public function __construct()
31
    {
32
        $this->subMenu = [
33
            'profiles' => [
34
                'title'  => trans('gitamin.profiles.profiles'),
35
                'url'    => route('profile.index'),
36
                'icon'   => 'fa fa-user',
37
                'active' => false,
38
            ],
39
            'account'   => [
40
                'title'  => trans('gitamin.profiles.account'),
41
                'url'    => route('profile.index'),
42
                'icon'   => 'fa fa-gear',
43
                'active' => false,
44
            ],
45
            'applications' => [
46
                'title'  => trans('gitamin.profiles.applications'),
47
                'url'    => route('profile.index'),
48
                'icon'   => 'fa fa-cloud',
49
                'active' => false,
50
            ],
51
            'emails' => [
52
                'title'  => trans('gitamin.profiles.emails'),
53
                'url'    => route('profile.index'),
54
                'icon'   => 'fa fa-envelope-o',
55
                'active' => false,
56
            ],
57
            'password' => [
58
                'title'  => trans('gitamin.profiles.password'),
59
                'url'    => route('profile.index'),
60
                'icon'   => 'fa fa-lock',
61
                'active' => false,
62
            ],
63
            'notifications' => [
64
                'title'  => trans('gitamin.profiles.notifications'),
65
                'url'    => route('profile.index'),
66
                'icon'   => 'fa fa-inbox',
67
                'active' => false,
68
            ],
69
            'ssh_keys' => [
70
                'title'  => trans('gitamin.profiles.ssh_keys'),
71
                'url'    => route('profile.index'),
72
                'icon'   => 'fa fa-key',
73
                'active' => false,
74
            ],
75
            'preferences' => [
76
                'title'  => trans('gitamin.profiles.preferences'),
77
                'url'    => route('profile.index'),
78
                'icon'   => 'fa fa-image',
79
                'active' => false,
80
            ],
81
            'audit_log' => [
82
                'title'  => trans('gitamin.profiles.audit_log'),
83
                'url'    => route('profile.index'),
84
                'icon'   => 'fa fa-history',
85
                'active' => false,
86
            ],
87
        ];
88
89
        View::share([
90
            'sub_menu'  => $this->subMenu,
91
            'sub_title' => trans_choice('dashboard.projects.projects', 2),
92
        ]);
93
    }
94
95
    /**
96
     * Display a listing of the resource.
97
     *
98
     * @return \Illuminate\Http\Response
99
     */
100
    public function indexAction()
101
    {
102
        //
103
        $this->subMenu['profiles']['active'] = true;
104
105
        return View::make('profiles.index')
106
            ->withSubMenu($this->subMenu)
107
            ->withPageTitle(trans('gitamin.profiles.profiles').' - '.trans('dashboard.dashboard'));
108
    }
109
}
110