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