Total Complexity | 4 |
Total Lines | 69 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 2 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
7 | class Callout extends Component |
||
8 | { |
||
9 | /** |
||
10 | * The callout icon (a Font Awesome icon). |
||
11 | * |
||
12 | * @var string |
||
13 | */ |
||
14 | public $icon; |
||
15 | |||
16 | /** |
||
17 | * The callout theme (info, success, warning or danger). |
||
18 | * |
||
19 | * @var string |
||
20 | */ |
||
21 | public $theme; |
||
22 | |||
23 | /** |
||
24 | * The callout title. |
||
25 | * |
||
26 | * @var string |
||
27 | */ |
||
28 | public $title; |
||
29 | |||
30 | /** |
||
31 | * Extra classes for the title container. This provides a way to customize |
||
32 | * the title style. |
||
33 | * |
||
34 | * @var string |
||
35 | */ |
||
36 | public $titleClass; |
||
37 | |||
38 | /** |
||
39 | * Create a new component instance. |
||
40 | * |
||
41 | * @return void |
||
42 | */ |
||
43 | 2 | public function __construct( |
|
50 | 2 | } |
|
51 | |||
52 | /** |
||
53 | * Make the class attribute for the callout item. |
||
54 | * |
||
55 | * @return string |
||
56 | */ |
||
57 | 1 | public function makeCalloutClass() |
|
58 | { |
||
59 | 1 | $classes = ['callout']; |
|
60 | |||
61 | 1 | if (! empty($this->theme)) { |
|
62 | 1 | $classes[] = "callout-{$this->theme}"; |
|
63 | } |
||
64 | |||
65 | 1 | return implode(' ', $classes); |
|
66 | } |
||
67 | |||
68 | /** |
||
69 | * Get the view / contents that represent the component. |
||
70 | * |
||
71 | * @return \Illuminate\View\View|string |
||
72 | */ |
||
73 | 1 | public function render() |
|
76 | } |
||
77 | } |
||
78 |