diff --git a/Theme/Backend/Components/AttributeView.php b/Theme/Backend/Components/AttributeView.php new file mode 100644 index 0000000..fb34a0d --- /dev/null +++ b/Theme/Backend/Components/AttributeView.php @@ -0,0 +1,69 @@ +setTemplate('/Modules/Attribute/Theme/Backend/Components/attributes'); + } + + /** + * {@inheritdoc} + */ + public function render(mixed ...$data) : string + { + /** @var array{0:\Modules\Attribute\Models\Attribute[]} $data */ + $this->attributes = $data[0]; + $this->attributeTypes = $data[1]; + $this->units = $data[2]; + $this->apiUri = $data[3]; + + return parent::render(); + } +} diff --git a/Theme/Backend/Components/attributes.tpl.php b/Theme/Backend/Components/attributes.tpl.php new file mode 100644 index 0000000..0898e44 --- /dev/null +++ b/Theme/Backend/Components/attributes.tpl.php @@ -0,0 +1,146 @@ +attributes; +$languages = ISO639Enum::getConstants(); +$types = $this->attributeTypes; +$units = $this->units; + +/** @var \phpOMS\Localization\Localization $l11n */ +$l11n = $this->data['defaultlocalization'] ?? new NullLocalization(); +?> + +