diff --git a/src/Actions/AssignUsersToWorkflowAction.php b/src/Actions/AssignUsersToWorkflowAction.php index 67cdc696..576727bf 100644 --- a/src/Actions/AssignUsersToWorkflowAction.php +++ b/src/Actions/AssignUsersToWorkflowAction.php @@ -20,6 +20,9 @@ * @license BSD License (http://silverstripe.org/bsd-license/) * @package advancedworkflow * @subpackage actions + * + * @method \SilverStripe\ORM\ManyManyList Users() + * @method \SilverStripe\ORM\ManyManyList Groups() */ class AssignUsersToWorkflowAction extends WorkflowAction { @@ -87,7 +90,7 @@ public function fieldLabels($relations = true) /** * Returns a set of all Members that are assigned to this WorkflowAction subclass, either directly or via a group. * - * @return ArrayList + * @return ArrayList */ public function getAssignedMembers() { diff --git a/src/Admin/AdvancedWorkflowAdmin.php b/src/Admin/AdvancedWorkflowAdmin.php index 17ac3788..d24cb41b 100644 --- a/src/Admin/AdvancedWorkflowAdmin.php +++ b/src/Admin/AdvancedWorkflowAdmin.php @@ -17,12 +17,14 @@ use SilverStripe\Forms\GridField\GridFieldImportButton; use SilverStripe\Forms\GridField\GridFieldPaginator; use SilverStripe\ORM\ArrayList; +use SilverStripe\ORM\DataList; use SilverStripe\ORM\DataObject; use SilverStripe\Security\Member; use SilverStripe\Security\Permission; use SilverStripe\Security\Security; use SilverStripe\View\Requirements; use Symbiote\AdvancedWorkflow\DataObjects\WorkflowDefinition; +use Symbiote\AdvancedWorkflow\DataObjects\WorkflowInstance; use Symbiote\AdvancedWorkflow\Dev\WorkflowBulkLoader; use Symbiote\AdvancedWorkflow\Forms\GridField\GridFieldExportAction; use Symbiote\AdvancedWorkflow\Forms\GridField\GridFieldWorkflowRestrictedEditButton; @@ -195,7 +197,7 @@ public function getEditForm($id = null, $fields = null) } $this->extend('updateEditFormAfter', $form); - + return $form; } @@ -260,7 +262,7 @@ public function setFieldFormatting(&$config) * * @param Member $member * @param string $fieldName The name of the gridfield that determines which dataset to return - * @return DataList + * @return ArrayList * @todo Add the ability to see embargo/expiry dates in report-gridfields at-a-glance if QueuedJobs module installed */ public function userObjects(Member $user, $fieldName) @@ -293,11 +295,12 @@ public function userObjects(Member $user, $fieldName) return $list; } - /* + /** * Return content-object data depending on which gridfeld is calling for it * * @param Member $user * @param string $fieldName + * @return DataList */ public function getFieldDependentData(Member $user, $fieldName) { diff --git a/src/DataObjects/WorkflowAction.php b/src/DataObjects/WorkflowAction.php index c61ae5f0..05a91c01 100644 --- a/src/DataObjects/WorkflowAction.php +++ b/src/DataObjects/WorkflowAction.php @@ -25,6 +25,10 @@ * @author marcus@symbiote.com.au * @license BSD License (http://silverstripe.org/bsd-license/) * @package advancedworkflow + * + * @method WorkflowDefinition WorkflowDef() + * @method Member Member() + * @method \SilverStripe\ORM\HasManyList Transitions() */ class WorkflowAction extends DataObject { diff --git a/src/DataObjects/WorkflowActionInstance.php b/src/DataObjects/WorkflowActionInstance.php index 259b7be9..6ce8bedd 100644 --- a/src/DataObjects/WorkflowActionInstance.php +++ b/src/DataObjects/WorkflowActionInstance.php @@ -22,6 +22,10 @@ * * @license BSD License (http://silverstripe.org/bsd-license/) * @package advancedworkflow + * + * @method WorkFlowInstance Workflow() + * @method WorkflowAction Baseaction() + * @method Member Member() */ class WorkflowActionInstance extends DataObject { @@ -181,7 +185,7 @@ public function getTitle() * If this action returns only one valid transition it will be immediately * followed; otherwise the user will decide which transition to follow. * - * @return ArrayList + * @return ArrayList */ public function getValidTransitions() { diff --git a/src/DataObjects/WorkflowInstance.php b/src/DataObjects/WorkflowInstance.php index 54c2b8f6..a0e89027 100644 --- a/src/DataObjects/WorkflowInstance.php +++ b/src/DataObjects/WorkflowInstance.php @@ -41,6 +41,9 @@ * @method WorkflowDefinition Definition() * @method WorkflowActionInstance CurrentAction() * @method Member Initiator() + * @method \SilverStripe\ORM\HasManyList Actions() + * @method \SilverStripe\ORM\ManyManyList Users() + * @method \SilverStripe\ORM\ManyManyList Groups() * * @author marcus@symbiote.com.au * @license BSD License (http://silverstripe.org/bsd-license/) @@ -287,7 +290,7 @@ public function Target($getLive = false) /** * Returns the field differences between the older version and current version of Target * - * @return ArrayList + * @return ArrayList */ public function getTargetDiff() { @@ -481,7 +484,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 */ public function getAssignedMembers() { diff --git a/src/DataObjects/WorkflowTransition.php b/src/DataObjects/WorkflowTransition.php index 39937c9c..a13c5890 100644 --- a/src/DataObjects/WorkflowTransition.php +++ b/src/DataObjects/WorkflowTransition.php @@ -251,7 +251,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 */ public function getAssignedMembers() { diff --git a/src/Extensions/WorkflowApplicable.php b/src/Extensions/WorkflowApplicable.php index 6debcbd3..6c243ccd 100644 --- a/src/Extensions/WorkflowApplicable.php +++ b/src/Extensions/WorkflowApplicable.php @@ -353,7 +353,7 @@ public function getWorkflowInstance() /** * Gets the history of a workflow instance * - * @return DataList + * @return DataList|void */ public function getWorkflowHistory($limit = null) { diff --git a/src/Services/WorkflowService.php b/src/Services/WorkflowService.php index e7eaf0c6..918a6b88 100644 --- a/src/Services/WorkflowService.php +++ b/src/Services/WorkflowService.php @@ -15,6 +15,7 @@ use Symbiote\AdvancedWorkflow\Extensions\FileWorkflowApplicable; use Symbiote\AdvancedWorkflow\Extensions\WorkflowApplicable; use Symbiote\AdvancedWorkflow\DataObjects\WorkflowAction; +use Symbiote\AdvancedWorkflow\DataObjects\WorkflowActionInstance; use Symbiote\AdvancedWorkflow\DataObjects\WorkflowDefinition; use Symbiote\AdvancedWorkflow\DataObjects\WorkflowInstance; use Symbiote\AdvancedWorkflow\DataObjects\WorkflowTransition; @@ -199,7 +200,7 @@ public function getWorkflowFor($item, $includeComplete = false) /** * Get all the workflow action instances for an item * - * @return DataList|null + * @return DataList|void */ public function getWorkflowHistoryFor($item, $limit = null) { @@ -212,7 +213,7 @@ public function getWorkflowHistoryFor($item, $limit = null) /** * Get all the available workflow definitions * - * @return DataList + * @return DataList */ public function getDefinitions() { @@ -297,11 +298,10 @@ public function startWorkflow(DataObject $object, $workflowID = null) * Get all the workflows that this user is responsible for * * @param Member $user The user to get workflows for - * @return ArrayList The list of workflow instances this user owns + * @return ArrayList The list of workflow instances this user owns */ public function usersWorkflows(Member $user) { - $groupIds = $user->Groups()->column('ID'); $groupInstances = null; @@ -339,7 +339,7 @@ public function usersWorkflows(Member $user) * Get items that the passed-in user has awaiting for them to action * * @param Member $member - * @return DataList + * @return DataList */ public function userPendingItems(Member $user) { @@ -367,7 +367,7 @@ public function userPendingItems(Member $user) * Get items that the passed-in user has submitted for workflow review * * @param Member $member - * @return DataList + * @return DataList */ public function userSubmittedItems(Member $user) {