AutorÃa | Ultima modificación | Ver Log |
<?php
declare(strict_types=1);
namespace LeadersLinked\Form\Microlearning;
use Laminas\Form\Form;
use Laminas\Db\Adapter\AdapterInterface;
use Laminas\Log\LoggerInterface;
use LeadersLinked\Mapper\CompanySizeMapper;
use LeadersLinked\Mapper\IndustryMapper;
use LeadersLinked\Model\SelfEvaluationForm;
use LeadersLinked\Model\MicrolearningQuiz;
class QuizCreateOrEditForm extends Form
{
public function __construct()
{
parent::__construct();
$this->setInputFilter(new QuizCreateOrEditFilter());
$this->add([
'name' => 'name',
'type' => \Laminas\Form\Element\Text::class,
'attributes' => [
'maxlength' => 128,
'id' => 'name',
]
]);
/*
$this->add([
'name' => 'text',
'type' => \Laminas\Form\Element\Textarea::class,
'attributes' => [
'id' => 'text',
]
]);
*/
$this->add([
'name' => 'points',
'type' => \Laminas\Form\Element\Text::class,
'attributes' => [
'maxlength' => 3,
'id' => 'points',
]
]);
$this->add([
'name' => 'minimum_points_required',
'type' => \Laminas\Form\Element\Text::class,
'attributes' => [
'maxlength' => 3,
'id' => 'minimum_points_required',
]
]);
$this->add([
'name' => 'status',
'type' => \Laminas\Form\Element\Select::class,
'options' => [
'empty_option' => 'LABEL_STATUS',
'value_options' => [
MicrolearningQuiz::STATUS_ACTIVE => 'LABEL_ACTIVE',
MicrolearningQuiz::STATUS_INACTIVE => 'LABEL_INACTIVE',
],
],
'attributes' => [
'id' => 'status',
]
]);
$this->add([
'name' => 'max_time',
'type' => \Laminas\Form\Element\Text::class,
'attributes' => [
'maxlength' => 2,
'id' => 'max_time',
]
]);
/*
$this->add([
'name' => 'failed',
'type' => \Laminas\Form\Element\Textarea::class,
'attributes' => [
'id' => 'failed',
]
]);
*/
}
}