v1.0 Initial commit of project
This commit is contained in:
47
pub/bin/php/Classes/pageNavbar.php
Normal file
47
pub/bin/php/Classes/pageNavbar.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<?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 }
|
||||
}
|
||||
Reference in New Issue
Block a user