From 0e272f5728a06e257a071a8aac739aacef397aa5 Mon Sep 17 00:00:00 2001 From: Guy Sartorelli Date: Tue, 17 Sep 2024 13:44:20 +1200 Subject: [PATCH] API Use new names for renamed classes --- src/BulkManager/BulkAction/EditHandler.php | 18 +++++++------- src/BulkManager/BulkAction/Handler.php | 28 +++++++++++----------- src/BulkManager/BulkManager.php | 4 ++-- src/BulkTools/HTTPBulkToolsResponse.php | 4 ++-- src/BulkUploader/BulkUploader.php | 2 +- 5 files changed, 28 insertions(+), 28 deletions(-) diff --git a/src/BulkManager/BulkAction/EditHandler.php b/src/BulkManager/BulkAction/EditHandler.php index 90b3793..45c2bc4 100644 --- a/src/BulkManager/BulkAction/EditHandler.php +++ b/src/BulkManager/BulkAction/EditHandler.php @@ -11,7 +11,7 @@ use SilverStripe\Forms\LiteralField; use SilverStripe\Forms\ToggleCompositeField; use SilverStripe\ORM\DataObject; -use SilverStripe\View\ArrayData; +use SilverStripe\Model\ArrayData; use SilverStripe\View\Requirements; /** @@ -24,7 +24,7 @@ class EditHandler extends Handler /** * URL segment used to call this handler * If none given, @BulkManager will fallback to the Unqualified class name - * + * * @var string */ private static $url_segment = 'edit'; @@ -53,14 +53,14 @@ class EditHandler extends Handler /** * Front-end label for this handler's action - * + * * @var string */ protected $label = 'Edit'; /** * Front-end icon path for this handler's action. - * + * * @var string */ protected $icon = ''; @@ -68,22 +68,22 @@ class EditHandler extends Handler /** * Extra classes to add to the bulk action button for this handler * Can also be used to set the button font-icon e.g. font-icon-trash - * + * * @var string */ protected $buttonClasses = 'font-icon-edit'; - + /** * Whether this handler should be called via an XHR from the front-end - * + * * @var boolean */ protected $xhr = false; - + /** * Set to true is this handler will destroy any data. * A warning and confirmation will be shown on the front-end. - * + * * @var boolean */ protected $destructive = false; diff --git a/src/BulkManager/BulkAction/Handler.php b/src/BulkManager/BulkAction/Handler.php index eb0c1d3..79fe863 100644 --- a/src/BulkManager/BulkAction/Handler.php +++ b/src/BulkManager/BulkAction/Handler.php @@ -7,7 +7,7 @@ use SilverStripe\Forms\GridField\GridFieldDetailForm; use SilverStripe\Forms\GridField\GridFieldDetailForm_ItemRequest; use SilverStripe\ORM\DataList; -use SilverStripe\View\ArrayData; +use SilverStripe\Model\ArrayData; use SilverStripe\Forms\GridField\GridField; /** @@ -22,7 +22,7 @@ class Handler extends RequestHandler /** * URL segment used to call this handler * If none given, @BulkManager will fallback to the Unqualified class name - * + * * @var string */ private static $url_segment = null; @@ -43,14 +43,14 @@ class Handler extends RequestHandler /** * Front-end label for this handler's action - * + * * @var string */ protected $label = 'Action'; /** * Front-end icon path for this handler's action. - * + * * @var string */ protected $icon = ''; @@ -58,22 +58,22 @@ class Handler extends RequestHandler /** * Extra classes to add to the bulk action button for this handler * Can also be used to set the button font-icon e.g. font-icon-trash - * + * * @var string */ protected $buttonClasses = ''; - + /** * Whether this handler should be called via an XHR from the front-end - * + * * @var boolean */ protected $xhr = true; - + /** * Set to true is this handler will destroy any data. * A warning and confirmation will be shown on the front-end. - * + * * @var boolean */ protected $destructive = false; @@ -109,7 +109,7 @@ public function getConfig() /** * Set if hanlder performs destructive actions - * + * * @param boolean destructive If true, a warning will be shown on the front-end * @return RequestHandler */ @@ -118,10 +118,10 @@ public function setDestructive($destructive) $this->destructive = $destructive; return $this; } - + /** * True if the hanlder performs destructive actions - * + * * @return boolean */ public function getDestructive() @@ -131,11 +131,11 @@ public function getDestructive() /** * Set if handler is called via XHR - * + * * @param boolean xhr If true the handler will be called via an XHR from front-end * @return RequestHandler */ - + public function setXhr($xhr) { $this->xhr = $xhr; diff --git a/src/BulkManager/BulkManager.php b/src/BulkManager/BulkManager.php index 274c69d..45fc2fb 100644 --- a/src/BulkManager/BulkManager.php +++ b/src/BulkManager/BulkManager.php @@ -14,7 +14,7 @@ use SilverStripe\Forms\GridField\GridField_HTMLProvider; use SilverStripe\Forms\GridField\GridField_URLHandler; use SilverStripe\ORM\DataObject; -use SilverStripe\View\ArrayData; +use SilverStripe\Model\ArrayData; use SilverStripe\View\Requirements; use SilverStripe\Control\Controller; @@ -290,7 +290,7 @@ public function getHTMLFragments($gridField) ->addExtraClass('bulkActionName no-change-track form-group--no-label') ->setAttribute('id', '') ->setEmptyString(_t('SilverStripe\Admin\LeftAndMain.DropdownBatchActionsDefault', 'Choose an action...')); - + $templateData = array( 'Menu' => $dropDownActionsList->FieldHolder(), diff --git a/src/BulkTools/HTTPBulkToolsResponse.php b/src/BulkTools/HTTPBulkToolsResponse.php index a690878..b7a0e3f 100644 --- a/src/BulkTools/HTTPBulkToolsResponse.php +++ b/src/BulkTools/HTTPBulkToolsResponse.php @@ -4,9 +4,9 @@ use SilverStripe\Control\HTTPResponse; use SilverStripe\Forms\GridField\GridField; -use SilverStripe\ORM\ArrayList; +use SilverStripe\Model\List\ArrayList; use SilverStripe\ORM\DataObject; -use SilverStripe\ORM\SS_List; +use SilverStripe\Model\List\SS_List; use SilverStripe\View\HTML; /** diff --git a/src/BulkUploader/BulkUploader.php b/src/BulkUploader/BulkUploader.php index 2097c11..b01dc85 100644 --- a/src/BulkUploader/BulkUploader.php +++ b/src/BulkUploader/BulkUploader.php @@ -3,7 +3,7 @@ namespace Colymba\BulkUpload; use SilverStripe\ORM\DataObject; -use SilverStripe\View\ArrayData; +use SilverStripe\Model\ArrayData; use SilverStripe\View\Requirements; use SilverStripe\Control\Controller;