mirror of
https://github.com/symbiote/silverstripe-gridfieldextensions.git
synced 2024-10-22 17:05:39 +02:00
commit
1ba0e644d4
7
_config.php
Normal file
7
_config.php
Normal file
@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
// Ensure compatibility with PHP 7.2 ("object" is a reserved word),
|
||||
// with SilverStripe 3.6 (using Object) and SilverStripe 3.7 (using SS_Object)
|
||||
if (!class_exists('SS_Object')) {
|
||||
class_alias('Object', 'SS_Object');
|
||||
}
|
@ -85,7 +85,7 @@ class GridFieldAddNewInlineButton implements GridField_HTMLProvider, GridField_S
|
||||
$handled = array_keys($editable->getDisplayFields($grid));
|
||||
|
||||
if($grid->getList()) {
|
||||
$record = Object::create($grid->getModelClass());
|
||||
$record = SS_Object::create($grid->getModelClass());
|
||||
} else {
|
||||
$record = null;
|
||||
}
|
||||
|
@ -174,7 +174,7 @@ class GridFieldAddNewMultiClass implements GridField_HTMLProvider, GridField_URL
|
||||
}
|
||||
|
||||
$unsanitisedClass = $this->unsanitiseClassName($class);
|
||||
$handler = Object::create($this->itemRequestClass,
|
||||
$handler = SS_Object::create($this->itemRequestClass,
|
||||
$grid, $component, new $unsanitisedClass(), $grid->getForm()->getController(), 'add-multi-class'
|
||||
);
|
||||
$handler->setTemplate($component->getTemplate());
|
||||
|
@ -196,7 +196,7 @@ class GridFieldEditableColumns extends GridFieldDataColumns implements
|
||||
$extra = $list->getExtraFields();
|
||||
|
||||
if($extra && array_key_exists($col, $extra)) {
|
||||
$field = Object::create_from_string($extra[$col], $col)->scaffoldFormField();
|
||||
$field = SS_Object::create_from_string($extra[$col], $col)->scaffoldFormField();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user