Remove Components/AttributeType::class it wasnt providing any functionality
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace App\View\Components;
|
||||
|
||||
use Closure;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Illuminate\View\Component;
|
||||
|
||||
@@ -16,19 +15,17 @@ class Attribute extends Component
|
||||
public bool $new;
|
||||
public bool $old;
|
||||
public string $langtag;
|
||||
public ?string $na; // Text to render if the LDAPAttribute is null
|
||||
|
||||
/**
|
||||
* Create a new component instance.
|
||||
*/
|
||||
public function __construct(?LDAPAttribute $o,bool $edit=FALSE,bool $old=FALSE,bool $new=FALSE,string $langtag=Entry::TAG_NOTAG,?string $na=NULL)
|
||||
public function __construct(?LDAPAttribute $o,bool $edit=FALSE,bool $old=FALSE,bool $new=FALSE,string $langtag=Entry::TAG_NOTAG)
|
||||
{
|
||||
$this->o = $o;
|
||||
$this->edit = $edit;
|
||||
$this->old = $old;
|
||||
$this->new = $new;
|
||||
$this->langtag = $langtag;
|
||||
$this->na = $na;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -41,6 +38,6 @@ class Attribute extends Component
|
||||
return $this->o
|
||||
? $this->o
|
||||
->render(edit: $this->edit,old: $this->old,new: $this->new)
|
||||
: $this->na;
|
||||
: __('Unknown');
|
||||
}
|
||||
}
|
@@ -1,40 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\View\Components;
|
||||
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Illuminate\View\Component;
|
||||
|
||||
use App\Classes\LDAP\Attribute as LDAPAttribute;
|
||||
use App\Ldap\Entry;
|
||||
|
||||
class AttributeType extends Component
|
||||
{
|
||||
private LDAPAttribute $o;
|
||||
private bool $new;
|
||||
private bool $edit;
|
||||
private string $langtag;
|
||||
|
||||
/**
|
||||
* Create a new component instance.
|
||||
*/
|
||||
public function __construct(LDAPAttribute $o,bool $new=FALSE,bool $edit=FALSE,string $langtag=Entry::TAG_NOTAG)
|
||||
{
|
||||
$this->o = $o;
|
||||
$this->new = $new;
|
||||
$this->edit = $edit;
|
||||
$this->langtag = $langtag;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the view / contents that represent the component.
|
||||
*/
|
||||
public function render(): View
|
||||
{
|
||||
return view('components.attribute-type')
|
||||
->with('o',$this->o)
|
||||
->with('new',$this->new)
|
||||
->with('edit',$this->edit)
|
||||
->with('langtag',$this->langtag);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user