1 | <?php |
||
21 | class HtmlBuilder extends \Illuminate\Html\HtmlBuilder |
||
22 | { |
||
23 | use Traits\BlueBoxTrait, |
||
24 | Traits\TabTrait, |
||
25 | Traits\DateTimeTrait; |
||
26 | |||
27 | /** |
||
28 | * Limit the number of characters in a string, & remove <p> tag. |
||
29 | * |
||
30 | * @param string $content |
||
31 | * @param int $size |
||
32 | * |
||
33 | * @return string |
||
34 | */ |
||
35 | 2 | public function trim($content, $size = 60) |
|
36 | { |
||
37 | 2 | return str_replace(['<p>', '</p>'], '', str_limit($content, $size)); |
|
38 | } |
||
39 | |||
40 | /** |
||
41 | * Format Markdown to Html. |
||
42 | * |
||
43 | * @param string $content |
||
44 | * |
||
45 | * @return string |
||
46 | */ |
||
47 | 24 | public function format($content) |
|
51 | |||
52 | /** |
||
53 | * Format issue number in string into a url to the issue. |
||
54 | * |
||
55 | * @param string $content |
||
56 | * |
||
57 | * @return string |
||
58 | */ |
||
59 | 24 | public function filterIssueNo($content) |
|
65 | |||
66 | /** |
||
67 | * Render loading Html. |
||
68 | * |
||
69 | * @param string $message |
||
70 | * |
||
71 | * @return string |
||
72 | */ |
||
73 | public function loader($message) |
||
80 | |||
81 | /** |
||
82 | * Format issue tag in string into Html. |
||
83 | * |
||
84 | * @param string $tag |
||
85 | * @param string|null $group |
||
86 | * |
||
87 | * @return string |
||
88 | */ |
||
89 | 16 | public function formatIssueTag($tag, $group = null) |
|
97 | } |
||
98 |