Quick backup before crash

This commit is contained in:
Dennis Eichhorn 2023-06-13 18:55:51 +00:00
parent 8d40af4972
commit ce915f69fa
2 changed files with 28 additions and 3 deletions

View File

@ -67,6 +67,13 @@ class Attribute implements \JsonSerializable
$this->value = new NullAttributeValue();
}
/**
* Deep clone the attribute element
*
* @return self
*
* @since 1.0.0
*/
public function deepClone() : self
{
$clone = clone $this;

View File

@ -38,10 +38,28 @@ class AttributeView extends View
*/
public array $attributes = [];
/**
* Attribute types
*
* @var \Modules\Attribute\Models\AttributeType[]
* @since 1.0.0
*/
public array $attributeTypes = [];
/**
* Units
*
* @var \Modules\Organization\Models\Unit[]
* @since 1.0.0
*/
public array $units = [];
/**
* API Uri for attribute actions
*
* @var string
* @since 1.0.0
*/
public string $apiUri = '';
/**
@ -59,10 +77,10 @@ class AttributeView extends View
public function render(mixed ...$data) : string
{
/** @var array{0:\Modules\Attribute\Models\Attribute[]} $data */
$this->attributes = $data[0];
$this->attributes = $data[0];
$this->attributeTypes = $data[1];
$this->units = $data[2];
$this->apiUri = $data[3];
$this->units = $data[2];
$this->apiUri = $data[3];
return parent::render();
}