-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDashboardPanel.php
More file actions
42 lines (39 loc) · 1.18 KB
/
Copy pathDashboardPanel.php
File metadata and controls
42 lines (39 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
/**
* PEP Capping 2017 Algozzine's Class
*
* Template for the dashboard panels.
*
* This class allows simple construction and display
* of the dashboard panels present on the home page. Calling
* the <code>createPanel()</code> function displays the panel
* to the screen.
*
* @author Jack Grzechowiak
* @copyright 2017 Marist College
* @version 0.1
* @since 0.1
*/
class DashboardPanel {
var $link, $title, $subtitle, $img;
function __construct($link, $title, $subtitle, $img) {
$this->link = $link;
$this->title = $title;
$this->subtitle = $subtitle;
$this->img = $img;
}
/**
* Displays the panel
*/
function createPanel() {
echo
"<a class='dashboard-panel justify-content-center d-flex flex-column align-self-stretch'" .
"href='" . $this->link . "'>" .
"<div class='img-div'>" .
"<i class='fa fa-" . $this->img . "' aria-hidden='true'></i>" .
"</div>" .
"<h2 class='button-main-title'>" . $this->title . "</h2>" .
"<p class='button-sub-title'>" . $this->subtitle . "</p>" .
"</a>";
}
}