| @@ 42-51 (lines=10) @@ | ||
| 39 | ->isRequired() |
|
| 40 | ->validate() |
|
| 41 | ->ifString() |
|
| 42 | ->then(function($value) { |
|
| 43 | if (!class_exists($value) || !is_a($value, Page::class, true)) { |
|
| 44 | throw new InvalidConfigurationException(sprintf( |
|
| 45 | 'Page class must be a valid class extending %s. "%s" given.', |
|
| 46 | Page::class, $value |
|
| 47 | )); |
|
| 48 | } |
|
| 49 | ||
| 50 | return $value; |
|
| 51 | }) |
|
| 52 | ->end() |
|
| 53 | ->end() |
|
| 54 | ->scalarNode('category_class') |
|
| @@ 58-67 (lines=10) @@ | ||
| 55 | ->isRequired() |
|
| 56 | ->validate() |
|
| 57 | ->ifString() |
|
| 58 | ->then(function($value) { |
|
| 59 | if (!class_exists($value) || !is_a($value, Category::class, true)) { |
|
| 60 | throw new InvalidConfigurationException(sprintf( |
|
| 61 | 'Category class must be a valid class extending %s. "%s" given.', |
|
| 62 | Category::class, $value |
|
| 63 | )); |
|
| 64 | } |
|
| 65 | ||
| 66 | return $value; |
|
| 67 | }) |
|
| 68 | ->end() |
|
| 69 | ->end() |
|
| 70 | ->arrayNode('layouts') |
|