1 <?php
2 3 4 5 6 7 8 9 10 11
12 Yii::import('yiiwheels.widgets.formhelpers.WhDropDownInputWidget');
13
14 class WhFontSizes extends WhDropDownInputWidget
15 {
16
17 public function init()
18 {
19 parent::init();
20 TbHtml::addCssClass('bfh-fontsizes', $this->htmlOptions);
21
22 if (!isset($this->htmlOptions['data-fontsize'])) {
23 $this->htmlOptions['data-fontsize'] = TbArray::popValue('data-value', $this->htmlOptions);
24 }
25 unset($this->htmlOptions['data-name'], $this->htmlOptions['data-value']);
26 }
27
28 public function run()
29 {
30
31 echo $this->dropDownList();
32
33 $this->registerPlugin('bfhfontsize');
34 }
35 }