| Conditions | 3 |
| Paths | 3 |
| Total Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 42 | protected function quote():string{ |
||
| 43 | |||
| 44 | if(empty($this->content)){ |
||
| 45 | return ''; |
||
| 46 | } |
||
| 47 | |||
| 48 | $id = $this->randomID(); |
||
| 49 | $url = filter_var($this->getAttribute('url'), FILTER_VALIDATE_URL); |
||
| 50 | |||
| 51 | // @todo |
||
| 52 | return '<div class="quote-container">'. |
||
| 53 | '<div data-id="'.$id.'" class="quote-header expander">quote '.($this->getAttribute('source', null) ?? '').(!empty($url) ? ' <small>[<a href="'.$url.'">link</a>]<small>' : '').'</div>'. |
||
| 54 | '<blockquote id="'.$id.'" class="quote-body" style="display:block;">'.$this->content.'</blockquote>'. // @todo: collapse (js: collapse child elements etc.) |
||
| 55 | '</div>'; |
||
| 56 | } |
||
| 57 | |||
| 59 |