Skip to content

Commit

Permalink
Merge pull request #287 from creative-commoners/pulls/5/protect-hooks
Browse files Browse the repository at this point in the history
API Set extension hook implementation visibility to protected
  • Loading branch information
GuySartorelli committed May 21, 2024
2 parents 0cb1319 + a7fc4ee commit f9b2cac
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Extensions/FluentLinkExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class FluentLinkExtension extends Extension
{
public function updateCMSFields(FieldList $fields)
protected function updateCMSFields(FieldList $fields)
{
$this->removeTabsWithFluentGridfields($fields);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Extensions/UsedOnTableExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

class UsedOnTableExtension extends Extension
{
public function updateUsageAncestorDataObjects(array &$ancestorDataObjects, DataObject $dataObject): void
protected function updateUsageAncestorDataObjects(array &$ancestorDataObjects, DataObject $dataObject): void
{
if (!is_a($dataObject, FileLink::class)) {
return;
Expand Down
2 changes: 1 addition & 1 deletion src/Models/Link.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ public function getVersionedState(): string
return 'unversioned';
}

public function onBeforeWrite(): void
protected function onBeforeWrite(): void
{
// Ensure a Sort value is set and that it's one larger than any other Sort value for
// this owner relation so that newly created Links on MultiLinkField's are properly sorted
Expand Down
2 changes: 1 addition & 1 deletion tests/php/Extensions/ExternalLinkExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class ExternalLinkExtension extends DataExtension implements TestOnly
{
public function updateDefaultLinkTitle(&$defaultLinkTitle): void
protected function updateDefaultLinkTitle(&$defaultLinkTitle): void
{
$defaultLinkTitle = sprintf('External Link: %s', $this->owner->getURL());
}
Expand Down

0 comments on commit f9b2cac

Please sign in to comment.