From 6bb75871a6b0573cb52924d463dc75b7846c6c4d Mon Sep 17 00:00:00 2001 From: Guy Sartorelli Date: Tue, 17 Sep 2024 13:44:07 +1200 Subject: [PATCH] API Use new names for renamed classes --- README.md | 2 +- src/ORM/FieldType/MultiValueField.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 9c4b93a..1f3db27 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ values in a simple manner Within templates, the field can be iterated over as per a data object set. The property $Value is available as a Varchar type, and other typical -properties such as $FirstLast etc are inherited from ViewableData. +properties such as $FirstLast etc are inherited from ModelData. Data is stored in the database in a serialized PHP format. While this is not ideal for searching purposes, some external indexing engines (eg the Solr diff --git a/src/ORM/FieldType/MultiValueField.php b/src/ORM/FieldType/MultiValueField.php index d88a53e..84d3c14 100755 --- a/src/ORM/FieldType/MultiValueField.php +++ b/src/ORM/FieldType/MultiValueField.php @@ -5,9 +5,9 @@ use SilverStripe\Forms\FormField; use SilverStripe\ORM\FieldType\DBComposite; use SilverStripe\ORM\FieldType\DBVarchar; -use SilverStripe\ORM\ArrayList; -use SilverStripe\View\ArrayData; -use SilverStripe\View\ViewableData; +use SilverStripe\Model\List\ArrayList; +use SilverStripe\Model\ArrayData; +use SilverStripe\Model\ModelData; use Symbiote\MultiValueField\Fields\MultiValueTextField; /** @@ -48,7 +48,7 @@ public function getValues(): mixed * * For a multivalue field, this will deserialise the value if it is a string */ - public function setValue(mixed $value, null|array|ViewableData $record = null, bool $markChanged = true): static + public function setValue(mixed $value, null|array|ModelData $record = null, bool $markChanged = true): static { $this->changed = $this->changed || $markChanged; if (!is_null($value)) {