mirror of
https://github.com/symbiote/silverstripe-gridfieldextensions.git
synced 2024-10-22 17:05:39 +02:00
Fixed bug where abstract classes aren't ignored with GridFieldAddNewMultiClass
This commit is contained in:
parent
ef57799a68
commit
51af2147f3
@ -95,7 +95,12 @@ class GridFieldAddNewMultiClass implements GridField_HTMLProvider, GridField_URL
|
||||
foreach($classes as $class => $title) {
|
||||
if(!is_string($class)) {
|
||||
$class = $title;
|
||||
if (($reflection = new ReflectionClass($class)) && $reflection->isAbstract()) {
|
||||
continue;
|
||||
}
|
||||
$title = singleton($class)->i18n_singular_name();
|
||||
} else if (($reflection = new ReflectionClass($class)) && $reflection->isAbstract()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if(!singleton($class)->canCreate()) {
|
||||
|
Loading…
Reference in New Issue
Block a user