Proyectos de Subversion LeadersLinked - Backend

Rev

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\Mapper\CompanySizeMapper; 
use LeadersLinked\Mapper\OrganizationalClimateFormMapper;
use LeadersLinked\Model\OrganizationalClimateForm;

class OrganizationalClimateFormForm extends Form
{

    /**
     * 
     * @param AdapterInterface $adapter
     * @param int $company_id
     */
    public function __construct($adapter, $company_id) 
    {
        parent::__construct();
        $this->setInputFilter(new OrganizationalClimateFormFilter($adapter));
        
        $this->add([
            'name' => 'name',
            'type' => \Laminas\Form\Element\Text::class,
             'attributes' => [
                'maxlength'     => 128,
                'id'                    => 'name',
            ]
        ]);

        $this->add([
            'name' => 'description',
            'type' => \Laminas\Form\Element\Textarea::class,
             'attributes' => [
                'id'                    => 'description',
             ],
        ]);

        $this->add([
            'name' => 'text',
            'type' => \Laminas\Form\Element\Textarea::class,
             'attributes' => [
                'id'                    => 'text',
             ],
        ]);

        $this->add([
            'name' => 'status',
            'type' => \Laminas\Form\Element\Select::class,
            'options' => [
                'empty_option' => 'LABEL_STATUS',
                'value_options' => [
                    OrganizationalClimateForm::STATUS_ACTIVE => 'LABEL_ACTIVE',
                    OrganizationalClimateForm::STATUS_INACTIVE => 'LABEL_INACTIVE',
                ],
            ],
            'attributes' => [
                'id' => 'status',
            ]
        ]);

        $this->add([
            'name' => 'content',
            'type' => \Laminas\Form\Element\Textarea::class,
            'attributes' => [
                'id'    => 'content',
            ]
        ]);

    }
        
    
}