Files
Sentri/pub/bin/php/Classes/pageNavbar.php
2026-01-01 10:54:18 +01:00

47 lines
1.2 KiB
PHP

<?php
namespace bin\php\Classes;
if (!defined('APP_INIT')) {
exit;
}
class pageNavbar
{
public $breadCrumb;
private $buttons = array();
public function __construct($showBreadCrumb, $title = false)
{
$this->breadCrumb = $showBreadCrumb;
$this->title = $title;
}
public function AddHTMLButton($html)
{
array_push($this->buttons, $html);
}
public function outPutNavbar()
{
?>
<div class="row">
<div class="col d-flex justify-content-start">
<?php if ($this->breadCrumb) { ?>
<div class="pb-2" id="breadCrumb"></div>
<?php } elseif ($this->title) { ?>
<h2 class="px-4 mb-0"><?php echo $this->title ?></h2>
<?php } else { ?>
<div></div>
<?php } ?>
</div>
<div class="col d-flex justify-content-end">
<?php if (count($this->buttons)) {
foreach ($this->buttons as $button) {
echo $button;
}
} ?>
</div>
</div>
<br>
<?php }
}