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/Neopoints/momsecurity.be/app/Questions/Kms/QuestionSection.php
<?php
/**
 *
 *
 * @author      Komma <info@komma.pro>
 * @copyright   (c) 2012-2016, Komma
 */

namespace App\Questions\Kms;

use Illuminate\Database\Eloquent\Model;
use Komma\KMS\Core\Attributes\Attribute;
use Komma\KMS\Core\Attributes\OnOff;
use Komma\KMS\Core\Attributes\TextArea;
use Komma\KMS\Core\Attributes\TextField;
use Komma\KMS\Core\Sections\Section;

final class QuestionSection extends Section
{

    public function defineAttributesAndTabs(Model $currentModel = null): void
    {

        $this->tabs->makeTab()->addItems([
            (new OnOff())
                ->setReference('active')
                ->setLabelText(__('KMS::global.active'))
                ->switchOn(),

            (new TextField())
                ->setLabelText(__('KMS::global.title'))
                ->mapValueFrom(Attribute::ValueFromTranslationModel, 'name'),

            (new TextArea())
                ->setLabelText(__('KMS::global.description'))
                ->setPlaceholderText(__('KMS::global.enterDescription'))
                ->enableTinymceEditor()
                ->mapValueFrom(Attribute::ValueFromTranslationModel, 'description'),
        ]);

    }
}