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 #873

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 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
Loading