Skip to content

Commit

Permalink
API Replace Extension subclasses
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Aug 28, 2024
1 parent 9371bc1 commit fb22b99
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 fb22b99

Please sign in to comment.