1 | <?php |
||
2 | |||
3 | namespace Osnova\Services\Timeline; |
||
4 | |||
5 | use Osnova\Services\ServiceEntity; |
||
6 | |||
7 | class EntryContent extends ServiceEntity |
||
8 | { |
||
9 | /** |
||
10 | * Get HTML value of entry content. |
||
11 | * |
||
12 | * @return string|null |
||
13 | */ |
||
14 | public function getHtml() |
||
15 | { |
||
16 | return $this->getData('html') ?? ''; |
||
0 ignored issues
–
show
Bug
Best Practice
introduced
by
![]() |
|||
17 | } |
||
18 | |||
19 | /** |
||
20 | * Get entry content's version. |
||
21 | * |
||
22 | * @return string|null |
||
23 | */ |
||
24 | public function getVersion() |
||
25 | { |
||
26 | return $this->getData('version') ?? ''; |
||
0 ignored issues
–
show
|
|||
27 | } |
||
28 | |||
29 | /** |
||
30 | * Transform current content instance to string representation. |
||
31 | * |
||
32 | * @return string |
||
33 | */ |
||
34 | public function __toString() |
||
35 | { |
||
36 | return $this->getHtml() ?? ''; |
||
37 | } |
||
38 | } |
||
39 |