Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Standardise extension hooks #1810

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion code/LeftAndMain.php
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,7 @@ protected function init()
}
}

$this->extend('init');
$this->extend('onInit');
Copy link
Member Author

@GuySartorelli GuySartorelli Aug 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Intentionally not changing to onAfterInit because this isn't at the end of the method.
Also not updateInit because it's not updating the value of some argument.


// Load the editor with original user themes before overwriting
// them with admin themes
Expand Down
2 changes: 1 addition & 1 deletion code/LeftAndMainExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function __construct()
parent::__construct();
}

public function init()
protected function onInit()
{
}

Expand Down
2 changes: 1 addition & 1 deletion tests/behat/src/Extension/CannotCreateExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class CannotCreateExtension extends Extension implements TestOnly
{
public function canCreate()
protected function canCreate()
{
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/behat/src/Extension/CannotDeleteExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class CannotDeleteExtension extends Extension implements TestOnly
{
public function canDelete()
protected function canDelete()
{
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/behat/src/Extension/CannotEditExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class CannotEditExtension extends Extension implements TestOnly
{
public function canEdit()
protected function canEdit()
{
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/php/CMSProfileControllerTest/TestExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

class TestExtension extends DataExtension
{
public function canEdit($member = null)
protected function canEdit($member = null)
{
return false;
}
Expand Down
Loading