Conditions | 3 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
36 | protected function generateInput(): string |
||
37 | { |
||
38 | $value = $this->getAttributeValue(); |
||
39 | |||
40 | if (!is_string($value) && $value !== null) { |
||
41 | throw new InvalidArgumentException('Text widget must be a string or null value.'); |
||
42 | } |
||
43 | |||
44 | $tag = Html::textInput($this->getInputName(), $value, $this->inputTagAttributes); |
||
45 | |||
46 | $tag = $this->prepareIdInInputTag($tag); |
||
47 | $tag = $this->preparePlaceholderInInputTag($tag); |
||
48 | |||
49 | return $tag->render(); |
||
50 | } |
||
52 |