Skip to content

Commit

Permalink
API Standardise extension hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli committed Aug 19, 2024
1 parent 860df12 commit f202e67
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Extensions/ElementalAreasExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ public function ensureElementalAreasExist($elementalAreaRelations)
*
* @return void
*/
public function requireDefaultRecords()
protected function onRequireDefaultRecords()
{
if (!$this->supportsElemental()) {
return;
Expand Down
2 changes: 1 addition & 1 deletion src/Extensions/ElementalLeftAndMainExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/
class ElementalLeftAndMainExtension extends Extension
{
public function init()
protected function onInit()
{
Requirements::add_i18n_javascript('dnadesign/silverstripe-elemental:client/lang');
}
Expand Down
2 changes: 1 addition & 1 deletion src/Extensions/ElementalPageExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ protected function updateAnchorsOnPage(array &$anchors): void
});
}

public function MetaTags(&$tags)
protected function updateMetaTags(&$tags)
{
if (!Controller::has_curr()) {
return;
Expand Down
2 changes: 1 addition & 1 deletion tests/Src/ValidationFailedExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class ValidationFailedExtension extends Extension implements TestOnly
{
public const INVALID_TITLE_MESSAGE = '%s is invalid';

public function validate(ValidationResult $result)
protected function updateValidate(ValidationResult $result)
{
$result->addFieldError('Title', sprintf(static::INVALID_TITLE_MESSAGE, ClassInfo::shortName($this->owner)));
}
Expand Down

0 comments on commit f202e67

Please sign in to comment.