mirror of
https://github.com/silverstripe/silverstripe-widgets
synced 2024-10-22 17:05:54 +02:00
Update WidgetAreaEditor.php
This commit is contained in:
parent
4dccc49a41
commit
ac1c1dabc8
@ -50,15 +50,17 @@ class WidgetAreaEditor extends FormField
|
||||
unset($classes[0]);
|
||||
}
|
||||
|
||||
foreach ($classes as $class) {
|
||||
$available = Config::inst()->get($class, 'only_available_in');
|
||||
|
||||
if (!empty($available) && is_array($available)) {
|
||||
if (in_array($this->Name, $available)) {
|
||||
if( isset($classes) ){
|
||||
foreach ($classes as $class) {
|
||||
$available = Config::inst()->get($class, 'only_available_in');
|
||||
|
||||
if (!empty($available) && is_array($available)) {
|
||||
if (in_array($this->Name, $available)) {
|
||||
$widgets->push(singleton($class));
|
||||
}
|
||||
} else {
|
||||
$widgets->push(singleton($class));
|
||||
}
|
||||
} else {
|
||||
$widgets->push(singleton($class));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user