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;
}
}