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

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/Dev/VersionedTestSessionExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class VersionedTestSessionExtension extends VersionedStateExtension
*
* @param string $url
*/
public function updateLink(&$url)
protected function updateLink(&$url)
{
$session = $this->owner->session();
if (!$session) {
Expand Down
4 changes: 2 additions & 2 deletions src/Versioned.php
Original file line number Diff line number Diff line change
Expand Up @@ -1589,7 +1589,7 @@ protected function extendcanRestoreToDraft()
* @param Member $member
* @return bool|null
*/
public function canView($member = null)
protected function canView($member = null)
{
// Invoke default version-gnostic canView
if ($this->owner->canViewVersioned($member) === false) {
Expand Down Expand Up @@ -2888,7 +2888,7 @@ protected function onBeforeDuplicate($source, $doWrite)
$this->owner->Version = 0;
}

public function flushCache()
protected function onFlushCache()
{
Versioned::$cache_versionnumber = [];
$this->versionModifiedCache = [];
Expand Down
2 changes: 1 addition & 1 deletion src/VersionedStateExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class VersionedStateExtension extends Extension
*
* @param string $link
*/
public function updateLink(&$link)
protected function updateLink(&$link)
{
// Skip if link already contains reading mode
if ($this->hasVersionedQuery($link)) {
Expand Down
2 changes: 1 addition & 1 deletion tests/php/VersionedTest/PublicExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*/
class PublicExtension extends DataExtension implements TestOnly
{
public function canViewNonLive($member = null)
protected function canViewNonLive($member = null)
{
return true;
}
Expand Down
Loading