mirror of
https://github.com/silverstripe/silverstripe-widgets
synced 2024-10-22 15:05:54 +00:00
FIX: Ensure available widgets list is consistent between versions (#6292)
This commit is contained in:
parent
dd6ffbfaf8
commit
0536ad31ce
@ -42,10 +42,13 @@ class WidgetAreaEditor extends FormField {
|
||||
foreach($this->widgetClasses as $widgetClass) {
|
||||
$classes = ClassInfo::subclassesFor($widgetClass);
|
||||
|
||||
if(count($classes) > 1) {
|
||||
array_shift($classes);
|
||||
if (isset($classes['Widget'])) {
|
||||
unset($classes['Widget']);
|
||||
}
|
||||
else if (isset($classes[0]) && $classes[0] == 'Widget') {
|
||||
unset($classes[0]);
|
||||
}
|
||||
|
||||
|
||||
foreach($classes as $class) {
|
||||
$widgets->push(singleton($class));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user