diff --git a/code/AdminErrorExtension.php b/code/AdminErrorExtension.php index f8d38e160..a72a51821 100644 --- a/code/AdminErrorExtension.php +++ b/code/AdminErrorExtension.php @@ -16,7 +16,7 @@ class AdminErrorExtension extends Extension /** * Used by {@see RequestHandler::httpError} */ - public function onBeforeHTTPError($statusCode, HTTPRequest $request, $errorMessage = null) + protected function onBeforeHTTPError($statusCode, HTTPRequest $request, $errorMessage = null) { $controller = $this->getAdminController(); if (!$controller || Director::is_ajax($request) || $errorMessage === null) { diff --git a/code/Forms/GridFieldDetailFormPreviewExtension.php b/code/Forms/GridFieldDetailFormPreviewExtension.php index a821614ed..68d87c346 100644 --- a/code/Forms/GridFieldDetailFormPreviewExtension.php +++ b/code/Forms/GridFieldDetailFormPreviewExtension.php @@ -17,7 +17,7 @@ */ class GridFieldDetailFormPreviewExtension extends Extension { - public function updateItemEditForm(Form $form): void + protected function updateItemEditForm(Form $form): void { $record = $this->owner->getRecord(); // See LeftAndMain::getEditForm() diff --git a/code/Forms/GridFieldPrintButtonExtension.php b/code/Forms/GridFieldPrintButtonExtension.php index ccd48f874..9e808ae92 100644 --- a/code/Forms/GridFieldPrintButtonExtension.php +++ b/code/Forms/GridFieldPrintButtonExtension.php @@ -11,7 +11,7 @@ */ class GridFieldPrintButtonExtension extends Extension { - public function updatePrintData($data) + protected function updatePrintData($data) { Requirements::css('silverstripe/admin:client/dist/styles/GridField_print.css'); } diff --git a/code/Forms/UsedOnTable.php b/code/Forms/UsedOnTable.php index ea5ef2108..0521d3a35 100644 --- a/code/Forms/UsedOnTable.php +++ b/code/Forms/UsedOnTable.php @@ -83,7 +83,7 @@ public function usage(HTTPRequest $request) // Legacy extension hook kept for backwards compatibility // Use 'updateUsageExcludedClasses' extension hook instead which prevents database from being queried // - // Example: public function updateUsage(ArrayList &$usage, DataObject &$record) + // Example: protected function updateUsage(ArrayList &$usage, DataObject &$record) // $dataObjects = $usage->exclude('ClassName', MyDataObject::class); $this->extend('updateUsage', $usage, $record); } diff --git a/code/LeftAndMainExtension.php b/code/LeftAndMainExtension.php index 62835f1e4..a13037656 100644 --- a/code/LeftAndMainExtension.php +++ b/code/LeftAndMainExtension.php @@ -17,11 +17,11 @@ public function init() { } - public function accessedCMS() + protected function accessedCMS() { } - public function augmentNewSiteTreeItem(&$item) + protected function augmentNewSiteTreeItem(&$item) { } } diff --git a/code/ModelAdmin.php b/code/ModelAdmin.php index 5af2b9c1c..6e9158757 100644 --- a/code/ModelAdmin.php +++ b/code/ModelAdmin.php @@ -381,7 +381,7 @@ public function getExportFields() * Archived flag is set to false. That would be best done as an extension, for example: * * - * public function updateList(\SilverStripe\ORM\DataList $list) + * protected function updateList(\SilverStripe\ORM\DataList $list) * { * return $list->filter('Archived', false); * }