| Total Complexity | 4 |
| Total Lines | 48 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | class SummernoteField extends FormField |
||
| 8 | { |
||
| 9 | const DEFAULT_HEIGHT = 150; |
||
| 10 | |||
| 11 | protected $type = 'summernote'; |
||
| 12 | |||
| 13 | /** |
||
| 14 | * Set editor height. |
||
| 15 | * |
||
| 16 | * @param int $height |
||
| 17 | * |
||
| 18 | * @return SummernoteField |
||
| 19 | */ |
||
| 20 | public function withHeight(int $height) |
||
| 21 | { |
||
| 22 | return $this->withParameter('height', $height); |
||
| 23 | } |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Get editor height. |
||
| 27 | * |
||
| 28 | * @return int |
||
| 29 | */ |
||
| 30 | public function height() |
||
| 31 | { |
||
| 32 | return $this->getParameter('height', static::DEFAULT_HEIGHT); |
||
| 33 | } |
||
| 34 | |||
| 35 | /** |
||
| 36 | * Set upload URL. |
||
| 37 | * |
||
| 38 | * @param string $url |
||
| 39 | * |
||
| 40 | * @return SummernoteField |
||
| 41 | */ |
||
| 42 | public function withUploadUrl(string $url) |
||
| 45 | } |
||
| 46 | |||
| 47 | /** |
||
| 48 | * Get upload URL. |
||
| 49 | * |
||
| 50 | * @return string|null |
||
| 51 | */ |
||
| 52 | public function uploadUrl() |
||
| 55 | } |
||
| 56 | } |
||
| 57 |