Skip to content

Commit

Permalink
Merge pull request #76 from creative-commoners/pulls/3/protect-hooks
Browse files Browse the repository at this point in the history
API Set extension hook implementation visibility to protected
  • Loading branch information
GuySartorelli authored May 21, 2024
2 parents 5e734e6 + 32b5f6f commit e0cb8d5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/Extensions/LDAPGroupExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class LDAPGroupExtension extends DataExtension
* {@inheritDoc}
* @param FieldList $fields
*/
public function updateCMSFields(FieldList $fields)
protected function updateCMSFields(FieldList $fields)
{
// Add read-only LDAP metadata fields.
$fields->addFieldToTab('Root.LDAP', ReadonlyField::create('GUID'));
Expand Down Expand Up @@ -115,7 +115,7 @@ public function updateCMSFields(FieldList $fields)
/**
* LDAPGroupMappings are inherently relying on groups and can be removed now.
*/
public function onBeforeDelete()
protected function onBeforeDelete()
{
foreach ($this->owner->LDAPGroupMappings() as $mapping) {
$mapping->delete();
Expand Down
10 changes: 5 additions & 5 deletions src/Extensions/LDAPMemberExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ class LDAPMemberExtension extends DataExtension
/**
* @param FieldList $fields
*/
public function updateCMSFields(FieldList $fields)
protected function updateCMSFields(FieldList $fields)
{
// Redo LDAP metadata fields as read-only and move to LDAP tab.
$ldapMetadata = [];
Expand Down Expand Up @@ -207,7 +207,7 @@ public function validate(ValidationResult $validationResult)
* Create the user in LDAP, provided this configuration is enabled
* and a username was passed to a new Member record.
*/
public function onBeforeWrite()
protected function onBeforeWrite()
{
if ($this->owner->LDAPMemberExtension_NoSync) {
return;
Expand All @@ -225,7 +225,7 @@ public function onBeforeWrite()
$service->createLDAPUser($this->owner);
}

public function onAfterWrite()
protected function onAfterWrite()
{
if ($this->owner->LDAPMemberExtension_NoSync) {
return;
Expand All @@ -241,7 +241,7 @@ public function onAfterWrite()
$this->sync();
}

public function onAfterDelete()
protected function onAfterDelete()
{
if ($this->owner->LDAPMemberExtension_NoSync) {
return;
Expand Down Expand Up @@ -316,7 +316,7 @@ public function afterMemberLoggedIn()
* @param string $newPassword
* @param ValidationResult $validation
*/
public function onBeforeChangePassword($newPassword, $validation)
protected function onBeforeChangePassword($newPassword, $validation)
{
// Don't do anything if there's already a validation failure
if (!$validation->isValid()) {
Expand Down

0 comments on commit e0cb8d5

Please sign in to comment.