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 07fee74 commit 819db13
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Extension/FluentIsolatedExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ protected function augmentDatabase()
}
}

public function requireDefaultRecords()
protected function onRequireDefaultRecords()
{
// Migrate records that used to be FluentFilteredExtension
$this->migrateFromFilteredExtension();
Expand Down
2 changes: 1 addition & 1 deletion src/Extension/FluentLeftAndMainExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class FluentLeftAndMainExtension extends Extension
use FluentAdminTrait;
use FluentBadgeTrait;

public function init()
protected function onInit()
{
Requirements::javascript("tractorcow/silverstripe-fluent:client/dist/js/fluent.js");
Requirements::css("tractorcow/silverstripe-fluent:client/dist/styles/fluent.css");
Expand Down
6 changes: 3 additions & 3 deletions src/Extension/FluentSiteTreeExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class FluentSiteTreeExtension extends FluentVersionedExtension
*
* @param string &$tags
*/
public function MetaTags(&$tags)
protected function updateMetaTags(&$tags)
{
$tags .= $this->owner->renderWith('FluentSiteTree_MetaTags');
}
Expand Down Expand Up @@ -80,7 +80,7 @@ public function getLinkToXDefault()
* @param string &$base
* @param string &$action
*/
public function updateRelativeLink(&$base, &$action)
protected function updateRelativeLink(&$base, &$action)
{

if ($this->owner->hasMethod('disablePrependLocaleURLSegmentToLink') && $this->owner->disablePrependLocaleURLSegmentToLink()) {
Expand Down Expand Up @@ -132,7 +132,7 @@ public function updateRelativeLink(&$base, &$action)
* @param string $action
* @param string $relativeLink
*/
public function updateLink(&$link, &$action, &$relativeLink)
protected function updateLink(&$link, &$action, &$relativeLink)
{
// Get appropriate locale for this record
$localeObj = $this->getRecordLocale();
Expand Down
2 changes: 1 addition & 1 deletion src/Extension/FluentVersionedExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ protected function isLocalisedInStage($stage, $locale = null)
/**
* Clear internal static property caches
*/
public function flushCache()
protected function onFlushCache()
{
static::reset();
}
Expand Down

0 comments on commit 819db13

Please sign in to comment.