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'),
]);
}
}