Skip to content

Commit

Permalink
Merge pull request #550 from creative-commoners/pulls/7/replace-exten…
Browse files Browse the repository at this point in the history
…sion-subclasses

API Replace Extension subclasses
  • Loading branch information
GuySartorelli committed Aug 28, 2024
2 parents 9371bc1 + fb22b99 commit 74dce95
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/Extensions/WorkflowApplicable.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
use SilverStripe\Forms\Tab;
use SilverStripe\Forms\TabSet;
use SilverStripe\ORM\CMSPreviewable;
use SilverStripe\ORM\DataExtension;
use SilverStripe\Core\Extension;
use SilverStripe\ORM\DataList;
use SilverStripe\ORM\DataObject;
use SilverStripe\ORM\ManyManyList;
Expand All @@ -41,9 +41,9 @@
* @method WorkflowDefinition WorkflowDefinition()
* @method ManyManyList<WorkflowDefinition> AdditionalWorkflowDefinitions()
*
* @extends DataExtension<DataObject&static>
* @extends Extension<DataObject&static>
*/
class WorkflowApplicable extends DataExtension
class WorkflowApplicable extends Extension
{
private static $has_one = [
'WorkflowDefinition' => WorkflowDefinition::class,
Expand Down
8 changes: 3 additions & 5 deletions src/Extensions/WorkflowEmbargoExpiryExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
use SilverStripe\Forms\HeaderField;
use SilverStripe\Forms\LiteralField;
use SilverStripe\ORM\ArrayList;
use SilverStripe\ORM\DataExtension;
use SilverStripe\Core\Extension;
use SilverStripe\ORM\DataQuery;
use SilverStripe\ORM\FieldType\DBDatetime;
use SilverStripe\ORM\FieldType\DBHTMLText;
Expand Down Expand Up @@ -39,9 +39,9 @@
* @method QueuedJobDescriptor PublishJob()
* @method QueuedJobDescriptor UnPublishJob()
*
* @extends DataExtension<DataObject&static>
* @extends Extension<DataObject&static>
*/
class WorkflowEmbargoExpiryExtension extends DataExtension
class WorkflowEmbargoExpiryExtension extends Extension
{
private static $db = array(
'DesiredPublishDate' => 'DBDatetime',
Expand Down Expand Up @@ -261,8 +261,6 @@ protected function onBeforeDuplicate($original, $doWrite)
*/
protected function onBeforeWrite()
{
parent::onBeforeWrite();

// only operate on staging content for this extension; otherwise, you
// need to publish the page to be able to set a 'future' publish...
// while the same could be said for the unpublish, the 'publish' state
Expand Down

0 comments on commit 74dce95

Please sign in to comment.