Rev 5878 | Ir a la última revisión | Autoría | Comparar con el anterior | Ultima modificación | Ver Log |
<?phpdeclare(strict_types=1);namespace LeadersLinked\Form\Chat;use Laminas\Form\Form;use Laminas\Db\Adapter\AdapterInterface;use LeadersLinked\Mapper\DegreeMapper;use LeadersLinked\Model\ZoomMeeting;use LeadersLinked\Library\Functions;use Laminas\Db\Adapter\Adapter;use LeadersLinked\Model\User;use LeadersLinked\Mapper\ChatUserMapper;use LeadersLinked\Mapper\UserMapper;class ZoomAddForm extends Form{/**** @param Adapter $adapter* @param User $user*/public function __construct(){parent::__construct();$this->setInputFilter(new ZoomAddFilter());$this->add(['name' => 'duration','type' => \Laminas\Form\Element\Select::class,'options' => ['value_options' => [5 => 'LABEL_5_MINUTES',10 => 'LABEL_10_MINUTES',15 => 'LABEL_15_MINUTES',20 => 'LABEL_20_MINUTES',25 => 'LABEL_25_MINUTES',30 => 'LABEL_30_MINUTES',35 => 'LABEL_35_MINUTES',40 => 'LABEL_40_MINUTES',45 => 'LABEL_45_MINUTES',]],'attributes' => ['id' => 'duration',]]);$this->add(['name' => 'password','type' => \Laminas\Form\Element\Text::class,'attributes' => ['maxlength' => 6,'id' => 'password',]]);$this->add(['name' => 'type','type' => \Laminas\Form\Element\Select::class,'options' => ['value_options' => [ZoomMeeting::TYPE_INSTANT => 'LABEL_ZOOM_MEETING_TYPE_INSTANT',ZoomMeeting::TYPE_SCHEDULED => 'LABEL_ZOOM_MEETING_TYPE_SCHEDULED',]],'attributes' => ['id' => 'type',]]);$this->add(['name' => 'title','type' => \Laminas\Form\Element\Text::class,'attributes' => ['maxlength' => 128,'id' => 'title',]]);$this->add(['name' => 'description','type' => \Laminas\Form\Element\Textarea::class,'attributes' => ['id' => 'description',]]);$this->add(['name' => 'date','type' => \Laminas\Form\Element\Text::class,'attributes' => ['maxlength' => 10,'id' => 'date',]]);$this->add(['name' => 'time','type' => \Laminas\Form\Element\Text::class,'attributes' => ['maxlength' => 10,'id' => 'time',]]);}/**** @return array*/private function optionsTimezone(){$records = Functions::getAllTimeZones();$items = [];foreach($records as $record){$items[$record] = $record;}return $items;}}