Jake Vanderwerf
2026-04-15 c4aa5cdb5e90ad4b420e22772797d16980232a2b
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
<?php
namespace JVBase\registrar\config;
 
 
use JVBase\registrar\Registrar;
 
if (!defined('ABSPATH')) {
    exit;
}
 
final class Breadcrumbs extends Config {
    public string $title;
    public null|string|array $addCrumb = null;
 
    public function __construct(string $title) {
        $this->title = $title;
    }
 
    public function setTitle(string $title): self {
        $this->title = $title;
        return $this;
    }
    public function getTitle():string
    {
        return $this->title;
    }
 
    public function setCrumb(string|array $crumb):self
    {
        $this->addCrumb = $crumb;
        return $this;
    }
    public function getCrumb():string|array
    {
        return $this->addCrumb;
    }
 
    function getConfig(): array
    {
        $config = [
            'title' => $this->title,
        ];
        if (!empty($this->addCrumb)) {
            $config['addCrumb'] = $this->addCrumb;
        }
        return $config;
    }
}