PATH:
home
/
lab2454c
/
costbloc.com
/
vendor
/
mpdf
/
mpdf
/
src
/
Tag
<?php namespace Mpdf\Tag; use Mpdf\Mpdf; class Select extends Tag { public function open($attr, &$ahtml, &$ihtml) { $this->mpdf->lastoptionaltag = ''; // Save current HTML specified optional endtag $this->mpdf->InlineProperties['SELECT'] = $this->mpdf->saveInlineProperties(); $properties = $this->cssManager->MergeCSS('', 'SELECT', $attr); if (isset($properties['FONT-FAMILY'])) { $this->mpdf->SetFont($properties['FONT-FAMILY'], $this->mpdf->FontStyle, 0, false); } if (isset($properties['FONT-SIZE'])) { $mmsize = $this->sizeConverter->convert($properties['FONT-SIZE'], $this->mpdf->default_font_size / Mpdf::SCALE); $this->mpdf->SetFontSize($mmsize * Mpdf::SCALE, false); } if (isset($attr['SPELLCHECK']) && strtolower($attr['SPELLCHECK']) === 'true') { $this->mpdf->selectoption['SPELLCHECK'] = true; } if (isset($properties['COLOR'])) { $this->mpdf->selectoption['COLOR'] = $this->colorConverter->convert($properties['COLOR'], $this->mpdf->PDFAXwarnings); } $this->mpdf->specialcontent = 'type=select'; if (isset($attr['DISABLED'])) { $this->mpdf->selectoption['DISABLED'] = $attr['DISABLED']; } if (isset($attr['READONLY'])) { $this->mpdf->selectoption['READONLY'] = $attr['READONLY']; } if (isset($attr['REQUIRED'])) { $this->mpdf->selectoption['REQUIRED'] = $attr['REQUIRED']; } if (isset($attr['EDITABLE'])) { $this->mpdf->selectoption['EDITABLE'] = $attr['EDITABLE']; } if (isset($attr['TITLE'])) { $this->mpdf->selectoption['TITLE'] = $attr['TITLE']; } if (isset($attr['MULTIPLE'])) { $this->mpdf->selectoption['MULTIPLE'] = $attr['MULTIPLE']; } if (isset($attr['SIZE']) && $attr['SIZE'] > 1) { $this->mpdf->selectoption['SIZE'] = $attr['SIZE']; } if ($this->mpdf->useActiveForms) { if (isset($attr['NAME'])) { $this->mpdf->selectoption['NAME'] = $attr['NAME']; } if (isset($attr['ONCHANGE'])) { $this->mpdf->selectoption['ONCHANGE'] = $attr['ONCHANGE']; } } } public function close(&$ahtml, &$ihtml) { $this->mpdf->ignorefollowingspaces = false; $this->mpdf->lastoptionaltag = ''; $texto = ''; $OTLdata = false; if (isset($this->mpdf->selectoption['SELECTED'])) { $texto = $this->mpdf->selectoption['SELECTED']; } if (isset($this->mpdf->selectoption['SELECTED-OTLDATA'])) { $OTLdata = $this->mpdf->selectoption['SELECTED-OTLDATA']; } if ($this->mpdf->useActiveForms) { $w = $this->mpdf->selectoption['MAXWIDTH']; } else { $w = $this->mpdf->GetStringWidth($texto, true, $OTLdata); } if ($w == 0) { $w = 5; } $objattr['type'] = 'select'; $objattr['text'] = $texto; $objattr['OTLdata'] = $OTLdata; if (isset($this->mpdf->selectoption['NAME'])) { $objattr['fieldname'] = $this->mpdf->selectoption['NAME']; } if (isset($this->mpdf->selectoption['READONLY'])) { $objattr['readonly'] = true; } if (isset($this->mpdf->selectoption['REQUIRED'])) { $objattr['required'] = true; } if (isset($this->mpdf->selectoption['SPELLCHECK'])) { $objattr['spellcheck'] = true; } if (isset($this->mpdf->selectoption['EDITABLE'])) { $objattr['editable'] = true; } if (isset($this->mpdf->selectoption['ONCHANGE'])) { $objattr['onChange'] = $this->mpdf->selectoption['ONCHANGE']; } if (isset($this->mpdf->selectoption['ITEMS'])) { $objattr['items'] = $this->mpdf->selectoption['ITEMS']; } if (isset($this->mpdf->selectoption['MULTIPLE'])) { $objattr['multiple'] = $this->mpdf->selectoption['MULTIPLE']; } if (isset($this->mpdf->selectoption['DISABLED'])) { $objattr['disabled'] = $this->mpdf->selectoption['DISABLED']; } if (isset($this->mpdf->selectoption['TITLE'])) { $objattr['title'] = $this->mpdf->selectoption['TITLE']; } if (isset($this->mpdf->selectoption['COLOR'])) { $objattr['color'] = $this->mpdf->selectoption['COLOR']; } if (isset($this->mpdf->selectoption['SIZE'])) { $objattr['size'] = $this->mpdf->selectoption['SIZE']; } $rows = 1; if (isset($objattr['size']) && $objattr['size'] > 1) { $rows = $objattr['size']; } $objattr['fontfamily'] = $this->mpdf->FontFamily; $objattr['fontsize'] = $this->mpdf->FontSizePt; $objattr['width'] = $w + ($this->form->form_element_spacing['select']['outer']['h'] * 2) + ($this->form->form_element_spacing['select']['inner']['h'] * 2) + ($this->mpdf->FontSize * 1.4); $objattr['height'] = ($this->mpdf->FontSize * $rows) + ($this->form->form_element_spacing['select']['outer']['v'] * 2) + ($this->form->form_element_spacing['select']['inner']['v'] * 2); $e = "\xbb\xa4\xactype=select,objattr=" . serialize($objattr) . "\xbb\xa4\xac"; // Output it to buffers if ($this->mpdf->tableLevel) { // *TABLES* $this->mpdf->_saveCellTextBuffer($e, $this->mpdf->HREF); $this->mpdf->cell[$this->mpdf->row][$this->mpdf->col]['s'] += $objattr['width']; // *TABLES* } // *TABLES* else { // *TABLES* $this->mpdf->_saveTextBuffer($e, $this->mpdf->HREF); } // *TABLES* $this->mpdf->selectoption = []; $this->mpdf->specialcontent = ''; if ($this->mpdf->InlineProperties['SELECT']) { $this->mpdf->restoreInlineProperties($this->mpdf->InlineProperties['SELECT']); } unset($this->mpdf->InlineProperties['SELECT']); } }
[-] Sup.php
[edit]
[-] Footer.php
[edit]
[-] Strong.php
[edit]
[-] TBody.php
[edit]
[-] H3.php
[edit]
[-] Dt.php
[edit]
[-] HGroup.php
[edit]
[-] H4.php
[edit]
[-] WatermarkText.php
[edit]
[-] Ttz.php
[edit]
[-] Meter.php
[edit]
[-] TocPageBreak.php
[edit]
[-] H1.php
[edit]
[-] NewPage.php
[edit]
[-] Section.php
[edit]
[-] Small.php
[edit]
[-] Input.php
[edit]
[-] IndexInsert.php
[edit]
[-] Pre.php
[edit]
[-] PageBreak.php
[edit]
[-] Option.php
[edit]
[+]
..
[-] BlockQuote.php
[edit]
[-] Big.php
[edit]
[-] PageFooter.php
[edit]
[-] Address.php
[edit]
[-] Columns.php
[edit]
[-] H5.php
[edit]
[-] Span.php
[edit]
[-] WatermarkImage.php
[edit]
[-] Legend.php
[edit]
[-] TocEntry.php
[edit]
[-] Bdo.php
[edit]
[-] Div.php
[edit]
[-] SubstituteTag.php
[edit]
[-] TFoot.php
[edit]
[-] Form.php
[edit]
[-] Table.php
[edit]
[-] Tts.php
[edit]
[-] I.php
[edit]
[-] Ol.php
[edit]
[-] Samp.php
[edit]
[-] Bdi.php
[edit]
[-] Kbd.php
[edit]
[-] P.php
[edit]
[-] Img.php
[edit]
[-] Tta.php
[edit]
[-] S.php
[edit]
[-] Header.php
[edit]
[-] Details.php
[edit]
[-] Code.php
[edit]
[-] A.php
[edit]
[-] Mark.php
[edit]
[-] IndexEntry.php
[edit]
[-] Bookmark.php
[edit]
[-] DotTab.php
[edit]
[-] THead.php
[edit]
[-] Main.php
[edit]
[-] Progress.php
[edit]
[-] Article.php
[edit]
[-] Center.php
[edit]
[-] Dl.php
[edit]
[-] Ul.php
[edit]
[-] SetPageHeader.php
[edit]
[-] Del.php
[edit]
[-] Figure.php
[edit]
[-] FieldSet.php
[edit]
[-] FormFeed.php
[edit]
[-] Ins.php
[edit]
[-] Cite.php
[edit]
[-] Strike.php
[edit]
[-] PageHeader.php
[edit]
[-] Summary.php
[edit]
[-] H6.php
[edit]
[-] NewColumn.php
[edit]
[-] TextArea.php
[edit]
[-] Tr.php
[edit]
[-] H2.php
[edit]
[-] Td.php
[edit]
[-] SetHtmlPageHeader.php
[edit]
[-] B.php
[edit]
[-] Select.php
[edit]
[-] Toc.php
[edit]
[-] Caption.php
[edit]
[-] Sub.php
[edit]
[-] Font.php
[edit]
[-] BarCode.php
[edit]
[-] Q.php
[edit]
[-] FigCaption.php
[edit]
[-] SetPageFooter.php
[edit]
[-] U.php
[edit]
[-] Hr.php
[edit]
[-] Nav.php
[edit]
[-] ColumnBreak.php
[edit]
[-] Time.php
[edit]
[-] Br.php
[edit]
[-] Dd.php
[edit]
[-] SetHtmlPageFooter.php
[edit]
[-] VarTag.php
[edit]
[-] Annotation.php
[edit]
[-] Aside.php
[edit]
[-] Li.php
[edit]
[-] Acronym.php
[edit]
[-] BlockTag.php
[edit]
[-] Tt.php
[edit]
[-] Tag.php
[edit]
[-] Em.php
[edit]
[-] Th.php
[edit]
[-] InlineTag.php
[edit]
[-] TextCircle.php
[edit]