phpldapadmin/app/View/Components/Attribute.php

36 lines
697 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;
2023-03-31 04:55:08 +00:00
/**
* Create a new component instance.
*
* @return void
*/
2023-09-02 10:50:54 +00:00
public function __construct(bool $edit,LDAPAttribute $o,bool $new=FALSE)
2023-03-31 04:55:08 +00:00
{
$this->edit = $edit;
$this->o = $o;
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()
{
2023-09-02 10:50:54 +00:00
return $this->o->render($this->edit,$this->new);
2023-03-31 04:55:08 +00:00
}
}