-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a12a4f2
commit 1a35e0f
Showing
12 changed files
with
67 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,8 @@ | |
* @author [email protected] | ||
* @license BSD License (http://silverstripe.org/bsd-license/) | ||
* @package advancedworkflow | ||
* | ||
* @method WorkflowDefinition Definition() | ||
*/ | ||
class ImportedWorkflowTemplate extends DataObject | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,7 @@ | |
use SilverStripe\Forms\TextField; | ||
use SilverStripe\ORM\DataObject; | ||
use SilverStripe\ORM\DB; | ||
use SilverStripe\ORM\HasManyList; | ||
use SilverStripe\Security\Member; | ||
use SilverStripe\Security\Permission; | ||
use SilverStripe\Security\Security; | ||
|
@@ -25,6 +26,10 @@ | |
* @author [email protected] | ||
* @license BSD License (http://silverstripe.org/bsd-license/) | ||
* @package advancedworkflow | ||
* | ||
* @method WorkflowDefinition WorkflowDef() | ||
* @method Member Member() | ||
* @method HasManyList<WorkflowTransition> Transitions() | ||
*/ | ||
class WorkflowAction extends DataObject | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,8 @@ | |
use SilverStripe\Forms\TreeMultiselectField; | ||
use SilverStripe\ORM\DataObject; | ||
use SilverStripe\ORM\DB; | ||
use SilverStripe\ORM\HasManyList; | ||
use SilverStripe\ORM\ManyManyList; | ||
use SilverStripe\Security\Group; | ||
use SilverStripe\Security\Member; | ||
use SilverStripe\Security\Permission; | ||
|
@@ -49,6 +51,11 @@ | |
* @author [email protected] | ||
* @license BSD License (http://silverstripe.org/bsd-license/) | ||
* @package advancedworkflow | ||
* | ||
* @method HasManyList<WorkflowAction> Actions() | ||
* @method HasManyList<WorkflowInstance> Instances() | ||
* @method ManyManyList<Member> Users() | ||
* @method ManyManyList<Group> Groups() | ||
*/ | ||
class WorkflowDefinition extends DataObject | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,8 @@ | |
use SilverStripe\Forms\TreeMultiselectField; | ||
use SilverStripe\ORM\ArrayList; | ||
use SilverStripe\ORM\DataObject; | ||
use SilverStripe\ORM\HasManyList; | ||
use SilverStripe\ORM\ManyManyList; | ||
use SilverStripe\ORM\Queries\SQLSelect; | ||
use SilverStripe\Security\Group; | ||
use SilverStripe\Security\Member; | ||
|
@@ -41,6 +43,9 @@ | |
* @method WorkflowDefinition Definition() | ||
* @method WorkflowActionInstance CurrentAction() | ||
* @method Member Initiator() | ||
* @method HasManyList<WorkflowActionInstance> Actions() | ||
* @method ManyManyList<Member> Users() | ||
* @method ManyManyList<Group> Groups() | ||
* | ||
* @author [email protected] | ||
* @license BSD License (http://silverstripe.org/bsd-license/) | ||
|
@@ -287,7 +292,7 @@ public function Target($getLive = false) | |
/** | ||
* Returns the field differences between the older version and current version of Target | ||
* | ||
* @return ArrayList | ||
* @return ArrayList<ArrayData> | ||
*/ | ||
public function getTargetDiff() | ||
{ | ||
|
@@ -481,7 +486,7 @@ public function performTransition(WorkflowTransition $transition) | |
* Returns a list of all Members that are assigned to this instance, either directly or via a group. | ||
* | ||
* @todo This could be made more efficient. | ||
* @return ArrayList | ||
* @return ArrayList<Member> | ||
*/ | ||
public function getAssignedMembers() | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,7 @@ | |
use SilverStripe\ORM\ArrayList; | ||
use SilverStripe\ORM\DataObject; | ||
use SilverStripe\ORM\DB; | ||
use SilverStripe\ORM\ManyManyList; | ||
use SilverStripe\Security\Group; | ||
use SilverStripe\Security\Member; | ||
use SilverStripe\Security\Permission; | ||
|
@@ -27,11 +28,14 @@ | |
* Therefore, any logic around whether the workflow can proceed should be | ||
* managed within this method. | ||
* | ||
* @method WorkflowAction Action() | ||
* @method WorkflowAction NextAction() | ||
* @author [email protected] | ||
* @license BSD License (http://silverstripe.org/bsd-license/) | ||
* @package advancedworkflow | ||
* | ||
* @method WorkflowAction Action() | ||
* @method WorkflowAction NextAction() | ||
* @method ManyManyList<Member> Users() | ||
* @method ManyManyList<Group> Groups() | ||
*/ | ||
class WorkflowTransition extends DataObject | ||
{ | ||
|
@@ -251,7 +255,7 @@ public function canDelete($member = null) | |
/** | ||
* Returns a set of all Members that are assigned to this transition, either directly or via a group. | ||
* | ||
* @return ArrayList | ||
* @return ArrayList<Member> | ||
*/ | ||
public function getAssignedMembers() | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
|
||
use SilverStripe\Control\Controller; | ||
use SilverStripe\Control\HTTPRequest; | ||
use SilverStripe\Control\RequestHandler; | ||
use SilverStripe\Core\Extension; | ||
use SilverStripe\Core\Manifest\ModuleLoader; | ||
use SilverStripe\Forms\Form; | ||
|
@@ -21,6 +22,8 @@ | |
* @author [email protected] | ||
* @license BSD License (http://silverstripe.org/bsd-license/) | ||
* @package advancedworkflow | ||
* | ||
* @extends Extension<RequestHandler> | ||
*/ | ||
class AdvancedWorkflowExtension extends Extension | ||
{ | ||
|
@@ -62,7 +65,6 @@ public function startworkflow($data, $form, $request) | |
public function updateEditForm(Form $form) | ||
{ | ||
Requirements::javascript('symbiote/silverstripe-advancedworkflow:client/dist/js/advancedworkflow.js'); | ||
/** @var WorkflowService $service */ | ||
$service = singleton(WorkflowService::class); | ||
/** @var DataObject|WorkflowApplicable $record */ | ||
$record = $form->getRecord(); | ||
|
@@ -127,7 +129,6 @@ public function updateItemEditForm($form) | |
*/ | ||
public function updateworkflow($data, Form $form, $request) | ||
{ | ||
/** @var WorkflowService $service */ | ||
$service = singleton(WorkflowService::class); | ||
/** @var DataObject $record */ | ||
$record = $form->getRecord(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,8 @@ | |
use SilverStripe\ORM\CMSPreviewable; | ||
use SilverStripe\ORM\DataExtension; | ||
use SilverStripe\ORM\DataList; | ||
use SilverStripe\ORM\DataObject; | ||
use SilverStripe\ORM\ManyManyList; | ||
use SilverStripe\Security\Permission; | ||
use SilverStripe\Security\Security; | ||
use Symbiote\AdvancedWorkflow\DataObjects\WorkflowActionInstance; | ||
|
@@ -35,6 +37,11 @@ | |
* @author [email protected] | ||
* @license BSD License (http://silverstripe.org/bsd-license/) | ||
* @package advancedworkflow | ||
* | ||
* @method WorkflowDefinition WorkflowDefinition() | ||
* @method ManyManyList<WorkflowDefinition> AdditionalWorkflowDefinitions() | ||
* | ||
* @extends DataExtension<DataObject&static> | ||
*/ | ||
class WorkflowApplicable extends DataExtension | ||
{ | ||
|
@@ -353,7 +360,7 @@ public function getWorkflowInstance() | |
/** | ||
* Gets the history of a workflow instance | ||
* | ||
* @return DataList | ||
* @return DataList<WorkflowActionInstance>|void | ||
*/ | ||
public function getWorkflowHistory($limit = null) | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,6 +35,11 @@ | |
* | ||
* @author [email protected] | ||
* @license BSD License http://silverstripe.org/bsd-license/ | ||
* | ||
* @method QueuedJobDescriptor PublishJob() | ||
* @method QueuedJobDescriptor UnPublishJob() | ||
* | ||
* @extends DataExtension<DataObject&static> | ||
*/ | ||
class WorkflowEmbargoExpiryExtension extends DataExtension | ||
{ | ||
|
@@ -293,7 +298,7 @@ public function onBeforeWrite() | |
if (!$this->owner->ID) { | ||
return; | ||
} | ||
|
||
if ($this->owner->hasMethod('isPublishJobRunning') && $this->owner->isPublishJobRunning()) { | ||
return; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters