File: D:/HostingSpaces/SBogers10/momsecurity.komma.nl/app/Components/Types/CtaText.php
<?php
namespace App\Components\Types;
use App\Components\ComponentTypes;
use Komma\KMS\Components\ComponentType\Types\AbstractComponentType;
use Komma\KMS\Core\Attributes\OnOff;
use Komma\KMS\Core\Attributes\Seperator;
use Komma\KMS\Core\Attributes\TextArea;
use Komma\KMS\Core\Attributes\TextField;
class CtaText extends AbstractComponentType
{
protected int $id = ComponentTypes::CTA_TEXT;
protected string $name = 'cta-text';
public function defineAttributesAndTabs()
{
$this->addItems([
(new TextArea())
->setReference('text' )
->enableTinymceEditor()
->setLabelText(__('KMS::attributes/components.text')),
(new Seperator()),
(new TextField())
->setReference('subtitle')
->setLabelText('Boven titel')
->setExplanation('Standaard: Benieuwd wat wij met deze gegevens doen?'),
(new TextField())
->setReference('title')
->setLabelText(__('KMS::attributes/components.title'))
->setExplanation('Standaard: Laat je adviseren door een van onze experts'),
(new TextField())
->setReference('button')
->setLabelText('Button')
->setExplanation('Standaard: Adviesgesprek aanvragen'),
(new TextField())
->setReference('link')
->setLabelText('Link')
->setExplanation('Standaard: /adviesgesprek'),
(new OnOff())
->setReference('without_shadow')
->setLabelText('Zonder shaduw'),
]);
}
}