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/fire-tech/fire-tech.nl/app/KommaApp/Kms/Core/Attributes/Button.php
<?php
/**
 * Created by PhpStorm.
 * User: julesgraus
 * Date: 22/11/17
 * Time: 11:36
 */

namespace App\KommaApp\Kms\Core\Attributes;

class Button extends Attribute
{
    private $id;
    private $modelId;
    /**
     * Title constructor.
     * @param string $title The text of the title
     */
    public function __construct(string $label = '', int $id, int $modelId)
    {
        parent::__construct();
        $reference = $label.''.strval($id);
        $this->mapValueFrom(Attribute::ValueFromItself, $reference);
        $this->setValue($label);
        $this->id = $id;
        $this->modelId = $modelId;
    }

    /**
     * Returns a view that visually represents this attribute
     *
     * @return \Illuminate\View\View
     */
    public function render()
    {
        return \View::make('kms/attributes.button', [
            'attribute' => $this
        ]);
    }

    public function getId(){
        return $this->id;
    }

    public function getModelId(){
        return $this->modelId;
    }
}