phpldapadmin/app/View/Components/Attribute.php

38 lines
764 B
PHP
Raw Normal View History

2023-03-31 04:55:08 +00:00
<?php
namespace App\View\Components;
use Illuminate\View\Component;
use App\Classes\LDAP\Attribute as LDAPAttribute;
class Attribute extends Component
{
public LDAPAttribute $o;
public bool $edit;
2023-09-02 10:50:54 +00:00
public bool $new;
public bool $old;
2023-03-31 04:55:08 +00:00
/**
* Create a new component instance.
*
* @return void
*/
public function __construct(LDAPAttribute $o,bool $edit,bool $old=FALSE,bool $new=FALSE)
2023-03-31 04:55:08 +00:00
{
$this->o = $o;
$this->edit = $edit;
$this->old = $old;
2023-09-02 10:50:54 +00:00
$this->new = $new;
2023-03-31 04:55:08 +00:00
}
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\Contracts\View\View|\Closure|string
*/
public function render()
{
return $this->o->render($this->edit,$this->old,$this->new);
2023-03-31 04:55:08 +00:00
}
}