File: D:/HostingSpaces/SBogers10/wingssprayer.komma.pro/app/Components/ComponentType/Types/Slogan.php
<?php
namespace App\Components\ComponentType\Types;
use App\Components\ComponentType\ComponentTypes;
use Komma\KMS\Core\Attributes\Attribute;
use Komma\KMS\Core\Attributes\TextArea;
use Komma\KMS\Core\Attributes\TextField;
class Slogan extends AbstractComponentType
{
public function __construct()
{
//Set an id that corresponds to the ComponentTypes enum
$this->id = ComponentTypes::SLOGAN;
//Set icon and name
$this->name = 'slogan';
parent::__construct();
$this->attributes->push((new TextField(__('kms/attributes/components.title')))
->mapValueFrom(Attribute::ValueFromComponent, 'title')
);
$this->attributes->push((new TextArea())
->enableTinymceEditor()
->mapValueFrom(Attribute::ValueFromComponent, 'description')
);
}
}