From 8902da6779fcc986e6722ab0765395d8c04b20d6 Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Wed, 21 Aug 2024 10:12:18 +1200 Subject: [PATCH] API Replace Extension subclasses --- src/Extensions/MaintenanceLockExtension.php | 6 +++--- src/Extensions/ScheduledExecutionExtension.php | 8 +++----- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/Extensions/MaintenanceLockExtension.php b/src/Extensions/MaintenanceLockExtension.php index 61063f1..7caf384 100644 --- a/src/Extensions/MaintenanceLockExtension.php +++ b/src/Extensions/MaintenanceLockExtension.php @@ -4,7 +4,7 @@ use SilverStripe\Forms\CheckboxField; use SilverStripe\Forms\FieldList; -use SilverStripe\ORM\DataExtension; +use SilverStripe\Core\Extension; use SilverStripe\SiteConfig\SiteConfig; use Symbiote\QueuedJobs\Services\QueuedJobService; @@ -14,9 +14,9 @@ * * @package Symbiote\QueuedJobs\Extensions * - * @extends DataExtension + * @extends Extension */ -class MaintenanceLockExtension extends DataExtension +class MaintenanceLockExtension extends Extension { /** * @param FieldList $fields diff --git a/src/Extensions/ScheduledExecutionExtension.php b/src/Extensions/ScheduledExecutionExtension.php index 05f0c8b..ae7064b 100644 --- a/src/Extensions/ScheduledExecutionExtension.php +++ b/src/Extensions/ScheduledExecutionExtension.php @@ -9,7 +9,7 @@ use SilverStripe\Forms\NumericField; use SilverStripe\Forms\ReadonlyField; use SilverStripe\Forms\TextField; -use SilverStripe\ORM\DataExtension; +use SilverStripe\Core\Extension; use SilverStripe\ORM\DataObject; use SilverStripe\ORM\FieldType\DBDatetime; use Symbiote\QueuedJobs\DataObjects\QueuedJobDescriptor; @@ -27,9 +27,9 @@ * * @method QueuedJobDescriptor ScheduledJob() * - * @extends DataExtension + * @extends Extension */ -class ScheduledExecutionExtension extends DataExtension +class ScheduledExecutionExtension extends Extension { /** * @var array @@ -107,8 +107,6 @@ protected function updateCMSFields(FieldList $fields) protected function onBeforeWrite() { - parent::onBeforeWrite(); - if ($this->owner->FirstExecution) { $changed = $this->owner->getChangedFields(); $changed = (