1 | <?php |
||
23 | trait BlueBoxTrait |
||
24 | { |
||
25 | /** |
||
26 | * Short cut method to call startBox() & endBox(). |
||
27 | * |
||
28 | * @param string $content |
||
29 | * @param string $style |
||
30 | * @param string|null $title |
||
31 | * @param string|null $moreLink |
||
32 | * @param string|null $moreTitle |
||
33 | * |
||
34 | * @return string |
||
35 | */ |
||
36 | 1 | public function box($content, $style = 'blue-box', $title = null, $moreLink = null, $moreTitle = null) |
|
37 | { |
||
38 | 1 | return $this->startBox($style, $title) . $content . $this->endBox($moreLink, $moreTitle); |
|
39 | } |
||
40 | |||
41 | /** |
||
42 | * Render the open tags for box (e.g. blue box). |
||
43 | * |
||
44 | * @param string $style |
||
45 | * @param string|null $title |
||
46 | * @param array $attrs |
||
47 | * |
||
48 | * @return string |
||
49 | */ |
||
50 | 19 | public function startBox($style = 'blue-box', $title = null, array $attrs = []) |
|
66 | |||
67 | /** |
||
68 | * Render the closing tags for the box (e.g. blue box). |
||
69 | * |
||
70 | * @param string|null $moreLink |
||
71 | * @param string|null $moreTitle |
||
72 | * |
||
73 | * @return string |
||
74 | */ |
||
75 | 19 | public function endBox($moreLink = null, $moreTitle = null) |
|
88 | } |
||
89 |