Completed
Branch dev (623cfe)
by Greg
04:05
created

Dashboard   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A displayPanel() 0 21 2
1
<?php
2
/**
3
 * /classes/DomainMOD/Dashboard.php
4
 *
5
 * This file is part of DomainMOD, an open source domain and internet asset manager.
6
 * Copyright (c) 2010-2017 Greg Chetcuti <[email protected]>
7
 *
8
 * Project: http://domainmod.org   Author: http://chetcuti.com
9
 *
10
 * DomainMOD is free software: you can redistribute it and/or modify it under the terms of the GNU General Public
11
 * License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later
12
 * version.
13
 *
14
 * DomainMOD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
15
 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
16
 *
17
 * You should have received a copy of the GNU General Public License along with DomainMOD. If not, see
18
 * http://www.gnu.org/licenses/.
19
 *
20
 */
21
//@formatter:off
22
namespace DomainMOD;
23
24
class Dashboard
25
{
26
27
    public function displayPanel($title, $count, $colour, $icon, $url)
28
    {
29
        ob_start(); ?>
30
31
        <div class="col-lg-3 col-xs-6">
32
            <div class="small-box bg-<?php echo $colour; ?>">
33
                <div class="inner">
34
                    <h3><?php echo number_format($count); ?></h3>
35
                    <p><?php echo $title; ?></p>
36
                </div>
37
                <div class="icon">
38
                    <i class="ion ion-<?php echo $icon; ?>" style="padding-top:16px;"></i>
39
                </div>
40
                <?php if ($count != 0) { ?>
41
                    <a href="<?php echo WEB_ROOT; ?><?php echo $url; ?>" class="small-box-footer">View <i class="fa fa-arrow-circle-right"></i></a>
42
                <?php } ?>
43
            </div>
44
        </div><?php
45
46
        return ob_get_clean();
47
    }
48
49
} //@formatter:on
50