Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Autoría | Ultima modificación | Ver Log |

<?php

declare(strict_types=1);

namespace LeadersLinked\Form\Feed;

use Laminas\Form\Form;
use Laminas\Db\Adapter\AdapterInterface;
use Laminas\Log\LoggerInterface;
use LeadersLinked\Mapper\CompanySizeMapper;
use LeadersLinked\Mapper\IndustryMapper;
use LeadersLinked\Model\Feed;

class ShareForm extends Form
{

    public function __construct() 
    {
        parent::__construct();
        $this->setInputFilter(new ShareFilter());

        $this->add([
            'name' => 'posted_or_shared',
            'type' => \Laminas\Form\Element\Hidden::class,
            'attributes' => [
                'id' => 'posted_or_shared',
                'value' => Feed::SHARED
            ]
        ]);
        
        $this->add([
            'name' => 'shared_with',
            'type' => \Laminas\Form\Element\Select::class,
            'options' => [
                'value_options' =>  [
                    Feed::SHARE_WITH_CONNECTIONS => 'LABEL_CONNECTIONS',
                    Feed::SHARE_WITH_PUBLIC => 'LABEL_PUBLIC'
                ],
            ],
            'attributes' => [
                'id' => 'shared_with',
            ]
        ]);
        
        $this->add([
            'name' => 'description',
            'type' => \Laminas\Form\Element\Textarea::class,
            'attributes' => [
                'id'    => 'description',
            ]
        ]);
    }
}