mirror of
https://github.com/silverstripe/silverstripe-environmentcheck
synced 2024-10-22 17:05:40 +02:00
Merge pull request #45 from andrewandante/FIX/remove_object
update to not include Object
This commit is contained in:
commit
04b7cb2ff1
@ -4,9 +4,10 @@ namespace SilverStripe\EnvironmentCheck;
|
|||||||
|
|
||||||
use Exception;
|
use Exception;
|
||||||
use InvalidArgumentException;
|
use InvalidArgumentException;
|
||||||
use SilverStripe\Core\Object;
|
use SilverStripe\Core\Injector\Injector;
|
||||||
use SilverStripe\EnvironmentCheck\EnvironmentCheck;
|
use SilverStripe\EnvironmentCheck\EnvironmentCheck;
|
||||||
use SilverStripe\ORM\ArrayList;
|
use SilverStripe\ORM\ArrayList;
|
||||||
|
use SilverStripe\ORM\DataObject;
|
||||||
use SilverStripe\View\ArrayData;
|
use SilverStripe\View\ArrayData;
|
||||||
use SilverStripe\View\ViewableData;
|
use SilverStripe\View\ViewableData;
|
||||||
|
|
||||||
@ -31,7 +32,7 @@ use SilverStripe\View\ViewableData;
|
|||||||
*
|
*
|
||||||
* @package environmentcheck
|
* @package environmentcheck
|
||||||
*/
|
*/
|
||||||
class EnvironmentCheckSuite extends Object
|
class EnvironmentCheckSuite extends DataObject
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Name of this suite.
|
* Name of this suite.
|
||||||
@ -134,7 +135,7 @@ class EnvironmentCheckSuite extends Object
|
|||||||
foreach ($this->checks as $check) {
|
foreach ($this->checks as $check) {
|
||||||
list($checkClass, $checkTitle) = $check;
|
list($checkClass, $checkTitle) = $check;
|
||||||
if (is_string($checkClass)) {
|
if (is_string($checkClass)) {
|
||||||
$checkInst = Object::create_from_string($checkClass);
|
$checkInst = Injector::inst()->create($checkClass);
|
||||||
if ($checkInst instanceof EnvironmentCheck) {
|
if ($checkInst instanceof EnvironmentCheck) {
|
||||||
$output[] = [$checkInst, $checkTitle];
|
$output[] = [$checkInst, $checkTitle];
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user