File: D:/HostingSpaces/SBogers10/shop.komma.nl/app/Attributes/PropertyDataCollection.php
<?php
namespace App\Attributes;
use Komma\KMS\Core\Attributes\Attribute;
/**
* @package App\Attributes
*/
class PropertyDataCollection extends Attribute
{
private Attribute $categoriesAttribute;
/**
* FixedProperties constructor.
*
* @param Attribute $categoriesAttribute
*/
public function __construct(Attribute $categoriesAttribute)
{
$this->categoriesAttribute = $categoriesAttribute;
parent::__construct();
}
/**
* Returns a view that visually represents this attribute
*/
public function render(): string
{
$data = [
'key' => (string) $this->getKey(),
'categories_key' => (string) $this->categoriesAttribute->getKey(),
'iso_2' => $this->associatedLanguage ? $this->associatedLanguage->iso_2 : null,
'value' => $this->getValue(),
];
return view('kms.attributes.propertyDataCollection', $data)->render();
}
}