File: D:/HostingSpaces/SBogers10/farmfun.komma.pro/app/Komma/Components/ComponentType/Types/Streamer.php
<?php
namespace App\Komma\Components\ComponentType\Types;
use App\Komma\Components\ComponentType\ComponentTypes;
use App\Komma\Kms\Core\Attributes\Attribute;
use App\Komma\Kms\Core\Attributes\OnOff;
use App\Komma\Kms\Core\Attributes\TextArea;
class Streamer extends AbstractComponentType
{
//Set an id that corresponds to the ComponentTypes enum
protected $id = ComponentTypes::STREAMER;
//Set icon and name
protected $name = 'streamer';
/**
* Video constructor.
*/
public function __construct()
{
parent::__construct();
$this->attributes->push((new TextArea())
->mapValueFrom(Attribute::ValueFromComponent, 'streamer')
);
$this->attributes->push((new OnOff())
->setLabelText('Toon tekst als H1 titel')
->mapValueFrom(Attribute::ValueFromComponent, 'as_h1')
);
}
}