Files
newspage/classes/Application/Breadcrumbs/Breadcrumb.php
2024-10-07 22:58:27 +02:00

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,
);
}
}