Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Replace Extension subclasses #550

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading