| Total Complexity | 5 |
| Total Lines | 59 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 2 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 5 | class InputFile extends InputGroupComponent |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * The placeholder for the input file box. |
||
| 9 | * |
||
| 10 | * @var string |
||
| 11 | */ |
||
| 12 | public $placeholder; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * A legend for replace the default 'Browse' text. |
||
| 16 | * |
||
| 17 | * @var string |
||
| 18 | */ |
||
| 19 | public $legend; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * Create a new component instance. |
||
| 23 | * Note this component requires the 'bs-custom-input-file' plugin. |
||
| 24 | * |
||
| 25 | * @return void |
||
| 26 | */ |
||
| 27 | 2 | public function __construct( |
|
| 28 | $name, $label = null, $size = null, $labelClass = null, $topClass = null, |
||
| 29 | $disableFeedback = null, $placeholder = '', $legend = null |
||
| 30 | ) { |
||
| 31 | 2 | parent::__construct( |
|
| 32 | 2 | $name, $label, $size, $labelClass, $topClass, $disableFeedback |
|
| 33 | ); |
||
| 34 | |||
| 35 | 2 | $this->legend = $legend; |
|
| 36 | 2 | $this->placeholder = $placeholder; |
|
| 37 | 2 | } |
|
| 38 | |||
| 39 | /** |
||
| 40 | * Make the class attribute for the input group item. |
||
| 41 | * |
||
| 42 | * @param string $invalid |
||
| 43 | * @return string |
||
| 44 | */ |
||
| 45 | 1 | public function makeItemClass($invalid) |
|
| 54 | } |
||
| 55 | |||
| 56 | /** |
||
| 57 | * Get the view / contents that represent the component. |
||
| 58 | * |
||
| 59 | * @return \Illuminate\View\View|string |
||
| 60 | */ |
||
| 61 | 1 | public function render() |
|
| 66 |