Skip to content

Commit

Permalink
API Set extension hook implementation visibility to protected
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed May 16, 2024
1 parent 226db3c commit 0eddcc1
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion code/AdminErrorExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion code/Forms/GridFieldDetailFormPreviewExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion code/Forms/GridFieldPrintButtonExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
Expand Down
2 changes: 1 addition & 1 deletion code/Forms/UsedOnTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
4 changes: 2 additions & 2 deletions code/LeftAndMainExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ public function init()
{
}

public function accessedCMS()
protected function accessedCMS()
{
}

public function augmentNewSiteTreeItem(&$item)
protected function augmentNewSiteTreeItem(&$item)
{
}
}
2 changes: 1 addition & 1 deletion code/ModelAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ public function getExportFields()
* Archived flag is set to false. That would be best done as an extension, for example:
*
* <code>
* public function updateList(\SilverStripe\ORM\DataList $list)
* protected function updateList(\SilverStripe\ORM\DataList $list)
* {
* return $list->filter('Archived', false);
* }
Expand Down

0 comments on commit 0eddcc1

Please sign in to comment.