| Conditions | 4 |
| Paths | 6 |
| Total Lines | 20 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 42 | protected function loadOptions(): void |
||
| 43 | { |
||
| 44 | $options = []; |
||
| 45 | |||
| 46 | if ($this->preset == 'custom') { |
||
| 47 | $optionsFile = null; |
||
| 48 | } else { |
||
| 49 | $optionsFile = __DIR__ . '/presets/' . $this->preset . '.php'; |
||
| 50 | } |
||
| 51 | |||
| 52 | if ($optionsFile !== null) { |
||
| 53 | if (!is_file($optionsFile)) { |
||
| 54 | throw new InvalidConfigException('The CKEditor options file can not be loaded.'); |
||
| 55 | } |
||
| 56 | $options = require($optionsFile); |
||
| 57 | } |
||
| 58 | |||
| 59 | $this->clientOptions = ArrayHelper::merge( |
||
| 60 | $options, |
||
| 61 | $this->clientOptions |
||
| 62 | ); |
||
| 65 |