Conditions | 2 |
Paths | 2 |
Total Lines | 21 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
14 | function template() |
||
|
|||
15 | { |
||
16 | $required=$this->column->getNotnull()?'required':''; |
||
17 | |||
18 | $template = str_replace( |
||
19 | [ |
||
20 | '{{columnName}}', |
||
21 | "{{type}}", |
||
22 | "{{required}}", |
||
23 | "{{label}}", |
||
24 | ], |
||
25 | [ |
||
26 | $this->column->getName(), |
||
27 | $this->getType(), |
||
28 | $required, |
||
29 | ucfirst(str_replace('_',' ',$this->column->getName())) |
||
30 | ], |
||
31 | $this->getFormStub('textArea') |
||
32 | ); |
||
33 | |||
34 | return $template; |
||
35 | } |
||
36 | } |
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.