33 lines
687 B
PHP
33 lines
687 B
PHP
<?php
|
|
|
|
namespace Application\Breadcrumbs;
|
|
|
|
class Breadcrumb {
|
|
|
|
/**
|
|
* @param string $name
|
|
* @param string $url
|
|
* @param bool $active
|
|
* @param bool $current
|
|
*/
|
|
public function __construct(
|
|
private string $name,
|
|
private string $url,
|
|
private bool $active = true,
|
|
private bool $current = true
|
|
) {}
|
|
|
|
public function setAsNotCurrent() {
|
|
$this->current = false;
|
|
}
|
|
|
|
public function getTemplateData() {
|
|
return array(
|
|
'name' => $this->name,
|
|
'url' => $this->url,
|
|
'active' => $this->active,
|
|
'current' => $this->current,
|
|
);
|
|
}
|
|
|
|
} |