HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
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();
    }
}