mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
ENHANCEMENT: has_extension() should allow injector overrides
This commit is contained in:
parent
075716f80d
commit
39a29fa2f6
@ -388,6 +388,9 @@ trait Extensible
|
|||||||
if (!$strict && is_subclass_of($extension, $requiredExtension)) {
|
if (!$strict && is_subclass_of($extension, $requiredExtension)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if (Injector::inst()->get($extension) instanceof $requiredExtension) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user