| 1 | <?php |
||
| 3 | class ElementalContentControllerExtension extends Extension |
||
|
|
|||
| 4 | { |
||
| 5 | /** |
||
| 6 | * |
||
| 7 | * @var array |
||
| 8 | */ |
||
| 9 | private static $allowed_actions = array( |
||
| 10 | 'handleWidget' |
||
| 11 | ); |
||
| 12 | |||
| 13 | /** |
||
| 14 | * Handles widgets attached to a page through one or more {@link WidgetArea} |
||
| 15 | * elements. |
||
| 16 | * |
||
| 17 | * Iterated through each $has_one relation with a {@link WidgetArea} and |
||
| 18 | * looks for connected widgets by their database identifier. |
||
| 19 | * |
||
| 20 | * Assumes URLs in the following format: <URLSegment>/widget/<Widget-ID>. |
||
| 21 | * |
||
| 22 | * @return RequestHandler |
||
| 23 | */ |
||
| 24 | public function handleWidget() |
||
| 75 | } |
||
| 76 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.