Skip to content

Commit

Permalink
ENH Use class name instead of self
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Jun 5, 2024
1 parent bad865d commit 0a4626c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Forms/GridField/GridFieldAddByDBField.php
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,6 @@ public function getHTMLFragments($gridField)
$forTemplate->Fields->push($textField);
$forTemplate->Fields->push($addAction);

return [$this->targetFragment => $forTemplate->renderWith(self::class)];
return [$this->targetFragment => $forTemplate->renderWith(GridFieldAddByDBField::class)];
}
}
6 changes: 3 additions & 3 deletions src/Model/Blog.php
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ public function canEditEditors($member = null)
return $extended;
}

return Permission::checkMember($member, self::MANAGE_USERS);
return Permission::checkMember($member, Blog::MANAGE_USERS);
}

/**
Expand All @@ -499,7 +499,7 @@ public function canEditWriters($member = null)
return true;
}

return Permission::checkMember($member, self::MANAGE_USERS);
return Permission::checkMember($member, Blog::MANAGE_USERS);
}

/**
Expand All @@ -523,7 +523,7 @@ public function canEditContributors($member = null)
return true;
}

return Permission::checkMember($member, self::MANAGE_USERS);
return Permission::checkMember($member, Blog::MANAGE_USERS);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/php/Widgets/BlogArchiveWidgetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class BlogArchiveWidgetTest extends SapphireTest
protected function setUp(): void
{
if (!class_exists(Widget::class)) {
self::$fixture_file = null;
BlogArchiveWidgetTest::$fixture_file = null;
parent::setUp();
$this->markTestSkipped('Test requires silverstripe/widgets to be installed.');
}
Expand Down

0 comments on commit 0a4626c

Please sign in to comment.