AutorÃa | Ultima modificación | Ver Log |
<?php
declare(strict_types=1);
namespace LeadersLinked\Form;
use Laminas\Form\Form;
use Laminas\Db\Adapter\AdapterInterface;
use Laminas\Log\LoggerInterface;
use LeadersLinked\Model\CompanyPerformanceEvaluationTestSelf;
class PerformanceEvaluationEvaluationSelfForm extends Form
{
/**
*
* @param AdapterInterface $adapter
* @param int $company_id
*/
public function __construct($adapter, $company_id)
{
parent::__construct();
$this->setInputFilter(new PerformanceEvaluationEvaluationSelfFilter($adapter));
$this->add([
'name' => 'form_id',
'type' => \Laminas\Form\Element\Select::class,
'attributes' => [
'id' => 'form_id',
]
]);
$this->add([
'name' => 'user_id',
'type' => \Laminas\Form\Element\Text::class,
'attributes' => [
'id' => 'user_id',
]
]);
$this->add([
'name' => 'first_name',
'type' => \Laminas\Form\Element\Text::class,
'attributes' => [
'maxlength' => 128,
'id' => 'first_name',
]
]);
$this->add([
'name' => 'last_name',
'type' => \Laminas\Form\Element\Text::class,
'attributes' => [
'maxlength' => 128,
'id' => 'last_name',
]
]);
$this->add([
'name' => 'email',
'type' => \Laminas\Form\Element\Text::class,
'attributes' => [
'maxlength' => 128,
'id' => 'email',
]
]);
$this->add([
'name' => 'content',
'type' => \Laminas\Form\Element\Textarea::class,
'attributes' => [
'id' => 'content',
]
]);
$this->add([
'name' => 'comment',
'type' => \Laminas\Form\Element\Textarea::class,
'attributes' => [
'id' => 'comment',
],
]);
$this->add([
'name' => 'points',
'type' => \Laminas\Form\Element\Select::class,
'options' => [
'empty_option' => 'LABEL_EVALUATION',
'value_options' => [
CompanyPerformanceEvaluationTestSelf::POINTS_0 => 'LABEL_ANOTHER',
CompanyPerformanceEvaluationTestSelf::POINTS_1 => '25%',
CompanyPerformanceEvaluationTestSelf::POINTS_2 => '50%',
CompanyPerformanceEvaluationTestSelf::POINTS_3 => '75%',
CompanyPerformanceEvaluationTestSelf::POINTS_4 => '100%',
],
],
'attributes' => [
'id' => 'points',
]
]);
$this->add([
'name' => 'supervisor_id',
'type' => \Laminas\Form\Element\Select::class,
'attributes' => [
'id' => 'supervisor_id',
]
]);
}
}