Jake Vanderwerf
4 hours ago 3baf3d2545ba6ece6b74a64c0def59bd0774cf54
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
43
44
45
46
47
48
49
50
51
52
53
54
55
<?php
namespace JVBase\managers\Dashboard;
 
if (!defined('ABSPATH')) {
    exit;
}
 
class Section {
    protected ?string $parent = null;
    protected string $title;
    protected string $slug;
    protected string $icon = '';
    protected int $order = 0;
    protected bool $isLink = false;
 
    public function __construct(string $title, ?string $slug = null, string $icon = '', ?string $parent = null) {
        $this->title = $title;
        $this->slug = is_null($slug) ? DashboardPage::sanitizeString($title) : DashboardPage::sanitizeString($slug);
        $this->icon = $icon;
        $this->parent = $parent;
    }
 
    public function getTitle():string
    {
        return $this->title;
    }
    public function getSlug():string
    {
        return $this->slug;
    }
    public function getIcon():string
    {
        return $this->icon;
    }
    public function getParent():?string
    {
        return $this->parent;
    }
    public function setOrder(int $order):void
    {
        $this->order = $order;
    }
    public function getOrder():int
    {
        return $this->order;
    }
    public function setIsLink(bool $isLink):void
    {
        $this->isLink = $isLink;
    }
    public function getIsLink():bool
    {
        return $this->isLink;
    }
}