ENH Use class name instead of self

This commit is contained in:
Steve Boyd 2024-06-05 15:28:36 +12:00
parent 942c599b80
commit 061245fe8e
2 changed files with 5 additions and 5 deletions

View File

@ -24,11 +24,11 @@ class ContentReviewCompatability
public static function start() public static function start()
{ {
$compatibility = [ $compatibility = [
self::SUBSITES => null, ContentReviewCompatability::SUBSITES => null,
]; ];
if (ClassInfo::exists(Subsite::class)) { if (ClassInfo::exists(Subsite::class)) {
$compatibility[self::SUBSITES] = Subsite::$disable_subsite_filter; $compatibility[ContentReviewCompatability::SUBSITES] = Subsite::$disable_subsite_filter;
Subsite::disable_subsite_filter(true); Subsite::disable_subsite_filter(true);
} }
@ -41,7 +41,7 @@ class ContentReviewCompatability
public static function done(array $compatibility) public static function done(array $compatibility)
{ {
if (class_exists(Subsite::class)) { if (class_exists(Subsite::class)) {
Subsite::$disable_subsite_filter = $compatibility[self::SUBSITES]; Subsite::$disable_subsite_filter = $compatibility[ContentReviewCompatability::SUBSITES];
} }
} }
} }

View File

@ -335,7 +335,7 @@ class SiteTreeContentReview extends DataExtension implements PermissionProvider
Requirements::javascript('silverstripe/contentreview:client/dist/js/contentreview.js'); Requirements::javascript('silverstripe/contentreview:client/dist/js/contentreview.js');
// Display read-only version only // Display read-only version only
if (!Permission::check("EDIT_CONTENT_REVIEW_FIELDS")) { if (!Permission::check("EDIT_CONTENT_REVIEW_FIELDS")) {
$schedule = self::get_schedule(); $schedule = SiteTreeContentReview::get_schedule();
$contentOwners = ReadonlyField::create( $contentOwners = ReadonlyField::create(
"ROContentOwners", "ROContentOwners",
_t(__CLASS__ . ".CONTENTOWNERS", "Content Owners"), _t(__CLASS__ . ".CONTENTOWNERS", "Content Owners"),
@ -429,7 +429,7 @@ class SiteTreeContentReview extends DataExtension implements PermissionProvider
$reviewFrequency = DropdownField::create( $reviewFrequency = DropdownField::create(
"ReviewPeriodDays", "ReviewPeriodDays",
_t(__CLASS__ . ".REVIEWFREQUENCY", "Review frequency"), _t(__CLASS__ . ".REVIEWFREQUENCY", "Review frequency"),
self::get_schedule() SiteTreeContentReview::get_schedule()
) )
->addExtraClass('custom-setting') ->addExtraClass('custom-setting')
->setDescription(_t( ->setDescription(_t(