5 use Mpdf\Utils\UtfString
;
7 class Option
extends Tag
10 public function open($attr, &$ahtml, &$ihtml)
12 $this->mpdf
->lastoptionaltag
= '';
13 $this->mpdf
->selectoption
['ACTIVE'] = true;
14 $this->mpdf
->selectoption
['currentSEL'] = false;
15 if (empty($this->mpdf
->selectoption
)) {
16 $this->mpdf
->selectoption
['MAXWIDTH'] = '';
17 $this->mpdf
->selectoption
['SELECTED'] = '';
19 if (isset($attr['SELECTED'])) {
20 $this->mpdf
->selectoption
['SELECTED'] = '';
21 $this->mpdf
->selectoption
['currentSEL'] = true;
23 if (isset($attr['VALUE'])) {
24 $attr['VALUE'] = UtfString
::strcode2utf($attr['VALUE']);
25 $attr['VALUE'] = $this->mpdf
->lesser_entity_decode($attr['VALUE']);
26 if ($this->mpdf
->onlyCoreFonts
) {
27 $attr['VALUE'] = mb_convert_encoding($attr['VALUE'], $this->mpdf
->mb_enc
, 'UTF-8');
30 $this->mpdf
->selectoption
['currentVAL'] = $attr['VALUE'];
33 public function close(&$ahtml, &$ihtml)
35 $this->mpdf
->selectoption
['ACTIVE'] = false;
36 $this->mpdf
->lastoptionaltag
= '';