Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Use new names for renamed classes #417

Merged
merged 1 commit into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/en/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ There is also the possibility to use Nested GridField with the data structure Ar
namespace App\Models;

use MyDataObject;
use SilverStripe\ORM\ArrayList;
use SilverStripe\Model\List\ArrayList;
use SilverStripe\ORM\DataObject;

class MyDataSet extends DataObject
Expand Down
2 changes: 1 addition & 1 deletion src/Extensions/GridFieldDetailFormItemRequestExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use SilverStripe\Forms\FieldList;
use SilverStripe\Forms\GridField\GridFieldDetailForm_ItemRequest as CoreGridFieldDetailForm_ItemRequest;
use SilverStripe\Forms\LiteralField;
use SilverStripe\View\ArrayData;
use SilverStripe\Model\ArrayData;
use SilverStripe\View\HTML;
use Symbiote\GridFieldExtensions\GridFieldAddNewMultiClass;
use Symbiote\GridFieldExtensions\GridFieldExtensions;
Expand Down
4 changes: 2 additions & 2 deletions src/GridFieldAddExistingSearchButton.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
use SilverStripe\Forms\GridField\AbstractGridFieldComponent;
use SilverStripe\Forms\GridField\GridField_HTMLProvider;
use SilverStripe\Forms\GridField\GridField_URLHandler;
use SilverStripe\ORM\SS_List;
use SilverStripe\View\ArrayData;
use SilverStripe\Model\List\SS_List;
use SilverStripe\Model\ArrayData;

/**
* A modal search dialog which uses search context to search for and add
Expand Down
2 changes: 1 addition & 1 deletion src/GridFieldAddExistingSearchHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
use SilverStripe\Forms\FormAction;
use SilverStripe\Forms\GridField\GridField;
use SilverStripe\ORM\DataList;
use SilverStripe\ORM\PaginatedList;
use SilverStripe\Model\List\PaginatedList;
use SilverStripe\ORM\Search\SearchContext;

/**
Expand Down
4 changes: 2 additions & 2 deletions src/GridFieldAddNewInlineButton.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
use SilverStripe\Forms\GridField\GridField;
use SilverStripe\Forms\GridField\GridField_HTMLProvider;
use SilverStripe\Forms\GridField\GridField_SaveHandler;
use SilverStripe\ORM\ArrayList;
use SilverStripe\Model\List\ArrayList;
use SilverStripe\ORM\DataObject;
use SilverStripe\ORM\DataObjectInterface;
use SilverStripe\ORM\FieldType\DBField;
use SilverStripe\ORM\ManyManyList;
use SilverStripe\ORM\ManyManyThroughList;
use SilverStripe\View\ArrayData;
use SilverStripe\Model\ArrayData;
use SilverStripe\View\Requirements;
use Exception;

Expand Down
2 changes: 1 addition & 1 deletion src/GridFieldAddNewMultiClass.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
use SilverStripe\Forms\GridField\GridField_HTMLProvider;
use SilverStripe\Forms\GridField\GridField_URLHandler;
use SilverStripe\Forms\GridField\GridFieldDetailForm;
use SilverStripe\View\ArrayData;
use SilverStripe\Model\ArrayData;
use ReflectionClass;
use Exception;

Expand Down
8 changes: 4 additions & 4 deletions src/GridFieldConfigurablePaginator.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
use SilverStripe\Forms\GridField\GridField_FormAction;
use SilverStripe\Forms\GridField\GridFieldPaginator;
use SilverStripe\Forms\GridField\GridState_Data;
use SilverStripe\ORM\ArrayList;
use SilverStripe\ORM\Limitable;
use SilverStripe\ORM\SS_List;
use SilverStripe\Model\List\ArrayList;
use SilverStripe\Model\List\Limitable;
use SilverStripe\Model\List\SS_List;
use SilverStripe\ORM\UnsavedRelationList;
use SilverStripe\View\ArrayData;
use SilverStripe\Model\ArrayData;

/**
* GridFieldConfigurablePaginator paginates the {@link GridField} list and adds controls to the bottom of
Expand Down
2 changes: 1 addition & 1 deletion src/GridFieldEditableColumns.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
use SilverStripe\Forms\HTMLEditor\HTMLEditorField;
use SilverStripe\Forms\LiteralField;
use SilverStripe\Forms\ReadonlyField;
use SilverStripe\ORM\ArrayList;
use SilverStripe\Model\List\ArrayList;
use SilverStripe\ORM\DataList;
use SilverStripe\ORM\DataObject;
use SilverStripe\ORM\DataObjectInterface;
Expand Down
2 changes: 1 addition & 1 deletion src/GridFieldExternalLink.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace Symbiote\GridFieldExtensions;

use SilverStripe\Forms\GridField\GridFieldDataColumns;
use SilverStripe\View\ArrayData;
use SilverStripe\Model\ArrayData;

/**
* Displays a link to an external source referenced 'external link'
Expand Down
12 changes: 6 additions & 6 deletions src/GridFieldNestedForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
use SilverStripe\ORM\DataList;
use SilverStripe\ORM\DataObject;
use SilverStripe\ORM\DataObjectInterface;
use SilverStripe\ORM\Filterable;
use SilverStripe\Model\List\Filterable;
use SilverStripe\ORM\Hierarchy\Hierarchy;
use SilverStripe\ORM\SS_List;
use SilverStripe\Model\List\SS_List;
use SilverStripe\Versioned\Versioned;
use SilverStripe\View\ViewableData;
use SilverStripe\Model\ModelData;
use Symbiote\GridFieldExtensions\GridFieldOrderableRows;

/**
Expand Down Expand Up @@ -246,7 +246,7 @@ public function getColumnContent($gridField, $record, $columnName)

GridFieldExtensions::include_requirements();

return ViewableData::create()->customise([
return ModelData::create()->customise([
'Toggle' => $toggle,
'Link' => $this->Link($record->ID),
'ToggleLink' => $this->ToggleLink($record->ID),
Expand Down Expand Up @@ -356,7 +356,7 @@ public function handleMoveToParent(GridField $gridField, $request): string
public function handleNestedItem(
GridField $gridField,
HTTPRequest|null $request = null,
ViewableData|null $record = null
ModelData|null $record = null
): HTTPResponse|RequestHandler|Form {
if ($this->atMaxNestingLevel($gridField)) {
throw new Exception('Max nesting level reached');
Expand Down Expand Up @@ -408,7 +408,7 @@ public function handleNestedItem(
public function toggleNestedItem(
GridField $gridField,
HTTPRequest|null $request = null,
ViewableData|null $record = null
ModelData|null $record = null
) {
$list = $gridField->getList();
if (!$record && $request && $list instanceof Filterable) {
Expand Down
4 changes: 2 additions & 2 deletions src/GridFieldNestedFormItemRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
use SilverStripe\Forms\GridField\GridFieldFilterHeader;
use SilverStripe\Forms\GridField\GridFieldPageCount;
use SilverStripe\Forms\GridField\GridFieldSortableHeader;
use SilverStripe\ORM\ArrayList;
use SilverStripe\Model\List\ArrayList;
use SilverStripe\ORM\HasManyList;
use SilverStripe\ORM\Hierarchy\Hierarchy;
use SilverStripe\View\ArrayData;
use SilverStripe\Model\ArrayData;
use Symbiote\GridFieldExtensions\GridFieldAddNewInlineButton;
use Symbiote\GridFieldExtensions\GridFieldEditableColumns;
use Symbiote\GridFieldExtensions\GridFieldOrderableRows;
Expand Down
8 changes: 4 additions & 4 deletions src/GridFieldOrderableRows.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
use SilverStripe\Forms\GridField\GridField_URLHandler;
use SilverStripe\Forms\GridField\GridFieldPaginator;
use SilverStripe\Forms\HiddenField;
use SilverStripe\ORM\ArrayList;
use SilverStripe\Model\List\ArrayList;
use SilverStripe\ORM\DataList;
use SilverStripe\ORM\DataObject;
use SilverStripe\ORM\DataObjectInterface;
Expand All @@ -27,9 +27,9 @@
use SilverStripe\ORM\ManyManyList;
use SilverStripe\ORM\ManyManyThroughList;
use SilverStripe\ORM\ManyManyThroughQueryManipulator;
use SilverStripe\ORM\SS_List;
use SilverStripe\Model\List\SS_List;
use SilverStripe\Versioned\Versioned;
use SilverStripe\View\ViewableData;
use SilverStripe\Model\ModelData;

/**
* Allows grid field rows to be re-ordered via drag and drop. Both normal data
Expand Down Expand Up @@ -348,7 +348,7 @@ public function getColumnContent($grid, $record, $col)
$sortField->addExtraClass('ss-orderable-hidden-sort');
$sortField->setForm($grid->getForm());

return ViewableData::create()->customise(array(
return ModelData::create()->customise(array(
'SortField' => $sortField
))->renderWith('Symbiote\\GridFieldExtensions\\GridFieldOrderableRowsDragHandle');
}
Expand Down
2 changes: 1 addition & 1 deletion src/GridFieldRequestHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
use SilverStripe\Forms\GridField\GridFieldDetailForm_ItemRequest;
use SilverStripe\Forms\Tab;
use SilverStripe\Forms\TabSet;
use SilverStripe\ORM\ArrayList;
use SilverStripe\Model\List\ArrayList;

/**
* A base utility class for request handlers which present a grid field detail
Expand Down
4 changes: 2 additions & 2 deletions src/GridFieldTitleHeader.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

use SilverStripe\Forms\GridField\AbstractGridFieldComponent;
use SilverStripe\Forms\GridField\GridField_HTMLProvider;
use SilverStripe\ORM\ArrayList;
use SilverStripe\View\ArrayData;
use SilverStripe\Model\List\ArrayList;
use SilverStripe\Model\ArrayData;

/**
* A simple header which displays column titles.
Expand Down
2 changes: 1 addition & 1 deletion tests/GridFieldConfigurablePaginatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use SilverStripe\Dev\SapphireTest;
use SilverStripe\Forms\GridField\GridField;
use SilverStripe\Forms\GridField\GridField_FormAction;
use SilverStripe\ORM\ArrayList;
use SilverStripe\Model\List\ArrayList;
use Symbiote\GridFieldExtensions\GridFieldConfigurablePaginator;

class GridFieldConfigurablePaginatorTest extends SapphireTest
Expand Down
2 changes: 1 addition & 1 deletion tests/GridFieldNestedFormTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use SilverStripe\Forms\Form;
use SilverStripe\Forms\GridField\GridField;
use SilverStripe\Forms\GridField\GridFieldConfig_RecordEditor;
use SilverStripe\ORM\ArrayList;
use SilverStripe\Model\List\ArrayList;
use Symbiote\GridFieldExtensions\GridFieldNestedForm;
use Symbiote\GridFieldExtensions\Tests\Stub\StubHierarchy;
use Symbiote\GridFieldExtensions\Tests\Stub\StubOrdered;
Expand Down
2 changes: 1 addition & 1 deletion tests/GridFieldOrderableRowsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use SilverStripe\Dev\SapphireTest;
use SilverStripe\Forms\GridField\GridField;
use SilverStripe\Forms\GridField\GridFieldConfig_RelationEditor;
use SilverStripe\ORM\ArrayList;
use SilverStripe\Model\List\ArrayList;
use SilverStripe\ORM\DataList;
use Symbiote\GridFieldExtensions\GridFieldOrderableRows;
use Symbiote\GridFieldExtensions\Tests\Stub\PolymorphM2MMapper;
Expand Down
Loading