| @@ -3,8 +3,6 @@ | ||
| 3 | 3 | namespace Symbiote\AdvancedWorkflow\Actions; | 
| 4 | 4 | |
| 5 | 5 | use SilverStripe\Forms\CheckboxField; | 
| 6 | -use SilverStripe\Forms\FieldGroup; | |
| 7 | -use SilverStripe\Forms\LabelField; | |
| 8 | 6 | use SilverStripe\Forms\NumericField; | 
| 9 | 7 | use SilverStripe\ORM\DataObject; | 
| 10 | 8 | use Symbiote\AdvancedWorkflow\DataObjects\WorkflowAction; | 
| @@ -250,9 +250,8 @@ discard block | ||
| 250 | 250 | /** | 
| 251 | 251 | * Get WorkflowInstance Target objects to show for users in initial gridfield(s) | 
| 252 | 252 | * | 
| 253 | - * @param Member $member | |
| 254 | 253 | * @param string $fieldName The name of the gridfield that determines which dataset to return | 
| 255 | - * @return DataList | |
| 254 | + * @return ArrayList | |
| 256 | 255 | * @todo Add the ability to see embargo/expiry dates in report-gridfields at-a-glance if QueuedJobs module installed | 
| 257 | 256 | */ | 
| 258 | 257 | public function userObjects(Member $user, $fieldName) | 
| @@ -303,7 +302,7 @@ discard block | ||
| 303 | 302 | * Spits out an exported version of the selected WorkflowDefinition for download. | 
| 304 | 303 | * | 
| 305 | 304 | * @param HTTPRequest $request | 
| 306 | - * @return HTTPResponse | |
| 305 | + * @return \SilverStripe\Control\HTTPResponse|null | |
| 307 | 306 | */ | 
| 308 | 307 | public function export(HTTPRequest $request) | 
| 309 | 308 |      { | 
| @@ -326,7 +325,7 @@ discard block | ||
| 326 | 325 | /** | 
| 327 | 326 | * Required so we can simply change the visible label of the "Import" button and lose some redundant form-fields. | 
| 328 | 327 | * | 
| 329 | - * @return Form | |
| 328 | + * @return null|\SilverStripe\Forms\Form | |
| 330 | 329 | */ | 
| 331 | 330 | public function ImportForm() | 
| 332 | 331 |      { | 
| @@ -94,7 +94,7 @@ discard block | ||
| 94 | 94 | * - required fields from the Context Object | 
| 95 | 95 | * - Actions from the connected WorkflowTransitions | 
| 96 | 96 | * | 
| 97 | - * @return Form | |
| 97 | + * @return null|FrontendWorkflowForm | |
| 98 | 98 | */ | 
| 99 | 99 | public function Form() | 
| 100 | 100 |      { | 
| @@ -150,7 +150,7 @@ discard block | ||
| 150 | 150 | * | 
| 151 | 151 | * @param array $data | 
| 152 | 152 | * @param Form $form | 
| 153 | - * @param SS_HTTPRequest $request | |
| 153 | + * @param HTTPRequest $request | |
| 154 | 154 | * @throws Exception | 
| 155 | 155 | */ | 
| 156 | 156 | public function doFrontEndAction(array $data, Form $form, HTTPRequest $request) | 
| @@ -70,7 +70,7 @@ discard block | ||
| 70 | 70 | * if null is returned from this method. | 
| 71 | 71 | * | 
| 72 | 72 | * @param DataObject $target | 
| 73 | - * @return bool | |
| 73 | + * @return boolean|null | |
| 74 | 74 | */ | 
| 75 | 75 | public function canEditTarget(DataObject $target) | 
| 76 | 76 |      { | 
| @@ -81,7 +81,7 @@ discard block | ||
| 81 | 81 | * Does this action restrict viewing of the document? | 
| 82 | 82 | * | 
| 83 | 83 | * @param DataObject $target | 
| 84 | - * @return bool | |
| 84 | + * @return boolean|null | |
| 85 | 85 | */ | 
| 86 | 86 | public function canViewTarget(DataObject $target) | 
| 87 | 87 |      { | 
| @@ -92,7 +92,7 @@ discard block | ||
| 92 | 92 | * Does this action restrict the publishing of a document? | 
| 93 | 93 | * | 
| 94 | 94 | * @param DataObject $target | 
| 95 | - * @return bool | |
| 95 | + * @return boolean|null | |
| 96 | 96 | */ | 
| 97 | 97 | public function canPublishTarget(DataObject $target) | 
| 98 | 98 |      { | 
| @@ -104,7 +104,7 @@ discard block | ||
| 104 | 104 | * | 
| 105 | 105 | * @param Member $member | 
| 106 | 106 | * @param array $context | 
| 107 | - * @return bool | |
| 107 | + * @return boolean|string | |
| 108 | 108 | */ | 
| 109 | 109 | public function canCreate($member = null, $context = array()) | 
| 110 | 110 |      { | 
| @@ -113,7 +113,7 @@ discard block | ||
| 113 | 113 | |
| 114 | 114 | /** | 
| 115 | 115 | * @param Member $member | 
| 116 | - * @return bool | |
| 116 | + * @return boolean|string | |
| 117 | 117 | */ | 
| 118 | 118 | public function canEdit($member = null) | 
| 119 | 119 |      { | 
| @@ -122,7 +122,7 @@ discard block | ||
| 122 | 122 | |
| 123 | 123 | /** | 
| 124 | 124 | * @param Member $member | 
| 125 | - * @return bool | |
| 125 | + * @return boolean|string | |
| 126 | 126 | */ | 
| 127 | 127 | public function canDelete($member = null) | 
| 128 | 128 |      { | 
| @@ -5,7 +5,6 @@ | ||
| 5 | 5 | use SilverStripe\Forms\CheckboxField; | 
| 6 | 6 | use SilverStripe\Forms\DropdownField; | 
| 7 | 7 | use SilverStripe\Forms\FieldList; | 
| 8 | -use SilverStripe\Forms\ReadonlyField; | |
| 9 | 8 | use SilverStripe\Forms\RequiredFields; | 
| 10 | 9 | use SilverStripe\Forms\TabSet; | 
| 11 | 10 | use SilverStripe\Forms\TextField; | 
| @@ -57,6 +57,7 @@ discard block | ||
| 57 | 57 | |
| 58 | 58 | /** | 
| 59 | 59 | * Gets fields for when this is part of an active workflow | 
| 60 | + * @param \SilverStripe\Forms\FieldList $fields | |
| 60 | 61 | */ | 
| 61 | 62 | public function updateWorkflowFields($fields) | 
| 62 | 63 |      { | 
| @@ -74,6 +75,9 @@ discard block | ||
| 74 | 75 | } | 
| 75 | 76 | } | 
| 76 | 77 | |
| 78 | + /** | |
| 79 | + * @param \SilverStripe\Forms\FieldList $fields | |
| 80 | + */ | |
| 77 | 81 | public function updateFrontendWorkflowFields($fields) | 
| 78 | 82 |      { | 
| 79 | 83 |          if ($this->BaseAction()->AllowCommenting) { | 
| @@ -108,6 +112,9 @@ discard block | ||
| 108 | 112 | return $obj; | 
| 109 | 113 | } | 
| 110 | 114 | |
| 115 | + /** | |
| 116 | + * @param \SilverStripe\Forms\FieldList $actions | |
| 117 | + */ | |
| 111 | 118 | public function updateFrontEndWorkflowActions($actions) | 
| 112 | 119 |      { | 
| 113 | 120 | $ba = $this->BaseAction(); | 
| @@ -453,7 +453,7 @@ discard block | ||
| 453 | 453 | * | 
| 454 | 454 | * @param Member $member | 
| 455 | 455 | * @param array $context | 
| 456 | - * @return bool | |
| 456 | + * @return boolean|string | |
| 457 | 457 | */ | 
| 458 | 458 | public function canCreate($member = null, $context = array()) | 
| 459 | 459 |      { | 
| @@ -469,7 +469,7 @@ discard block | ||
| 469 | 469 | /** | 
| 470 | 470 | * | 
| 471 | 471 | * @param Member $member | 
| 472 | - * @return boolean | |
| 472 | + * @return boolean|null | |
| 473 | 473 | */ | 
| 474 | 474 | public function canView($member = null) | 
| 475 | 475 |      { | 
| @@ -479,7 +479,7 @@ discard block | ||
| 479 | 479 | /** | 
| 480 | 480 | * | 
| 481 | 481 | * @param Member $member | 
| 482 | - * @return boolean | |
| 482 | + * @return boolean|string | |
| 483 | 483 | */ | 
| 484 | 484 | public function canEdit($member = null) | 
| 485 | 485 |      { | 
| @@ -489,7 +489,7 @@ discard block | ||
| 489 | 489 | /** | 
| 490 | 490 | * | 
| 491 | 491 | * @param Member $member | 
| 492 | - * @return boolean | |
| 492 | + * @return boolean|string | |
| 493 | 493 |       * @see {@link $this->onBeforeDelete()} | 
| 494 | 494 | */ | 
| 495 | 495 | public function canDelete($member = null) | 
| @@ -517,7 +517,7 @@ discard block | ||
| 517 | 517 | * Checks whether the passed user is able to view this ModelAdmin | 
| 518 | 518 | * | 
| 519 | 519 | * @param Member $member | 
| 520 | - * @return bool | |
| 520 | + * @return boolean|null | |
| 521 | 521 | */ | 
| 522 | 522 | protected function userHasAccess($member) | 
| 523 | 523 |      { | 
| @@ -5,7 +5,6 @@ discard block | ||
| 5 | 5 | use SilverStripe\Control\Controller; | 
| 6 | 6 | use SilverStripe\Forms\CheckboxSetField; | 
| 7 | 7 | use SilverStripe\Forms\DropdownField; | 
| 8 | -use SilverStripe\Forms\FieldGroup; | |
| 9 | 8 | use SilverStripe\Forms\FieldList; | 
| 10 | 9 | use SilverStripe\Forms\FormAction; | 
| 11 | 10 | use SilverStripe\Forms\GridField\GridFieldConfig_RecordEditor; | 
| @@ -16,7 +15,6 @@ discard block | ||
| 16 | 15 | use SilverStripe\Forms\GridField\GridFieldViewButton; | 
| 17 | 16 | use SilverStripe\Forms\GridField\GridFieldDetailForm; | 
| 18 | 17 | use SilverStripe\Forms\GridField\GridFieldConfig_Base; | 
| 19 | -use SilverStripe\Forms\LabelField; | |
| 20 | 18 | use SilverStripe\Forms\LiteralField; | 
| 21 | 19 | use SilverStripe\Forms\NumericField; | 
| 22 | 20 | use SilverStripe\Forms\ReadonlyField; | 
| @@ -585,7 +585,7 @@ discard block | ||
| 585 | 585 | /** | 
| 586 | 586 | * Does this action restrict the publishing of a document? | 
| 587 | 587 | * | 
| 588 | - * @return boolean | |
| 588 | + * @return boolean|null | |
| 589 | 589 | */ | 
| 590 | 590 | public function canPublishTarget() | 
| 591 | 591 |      { | 
| @@ -598,7 +598,7 @@ discard block | ||
| 598 | 598 | * Get the current set of transitions that are valid for the current workflow state, | 
| 599 | 599 | * and are available to the current user. | 
| 600 | 600 | * | 
| 601 | - * @return array | |
| 601 | + * @return ArrayList | |
| 602 | 602 | */ | 
| 603 | 603 | public function validTransitions() | 
| 604 | 604 |      { | 
| @@ -731,9 +731,9 @@ discard block | ||
| 731 | 731 | * We need a way to "associate" an author with this WorkflowInstance and its Target() to see if she is "allowed" to view WorkflowInstances within GridFields | 
| 732 | 732 |       * @see {@link $this->userHasAccess()} | 
| 733 | 733 | * | 
| 734 | - * @param number $recordID | |
| 734 | + * @param integer $recordID | |
| 735 | 735 | * @param number $userID | 
| 736 | - * @param number $wasPublished | |
| 736 | + * @param integer $wasPublished | |
| 737 | 737 | * @return boolean | 
| 738 | 738 | */ | 
| 739 | 739 | public function getVersionedConnection($recordID, $userID, $wasPublished = 0) | 
| @@ -770,7 +770,7 @@ discard block | ||
| 770 | 770 | /** | 
| 771 | 771 | * Tells us if $member has had permissions over some part of the current WorkflowInstance. | 
| 772 | 772 | * | 
| 773 | - * @param $member | |
| 773 | + * @param Member $member | |
| 774 | 774 | * @return WorkflowAction|boolean | 
| 775 | 775 | */ | 
| 776 | 776 | public function getMostRecentActionForUser($member = null) | 
| @@ -217,7 +217,7 @@ discard block | ||
| 217 | 217 | * | 
| 218 | 218 | * @param Member $member | 
| 219 | 219 | * @param array $context | 
| 220 | - * @return bool | |
| 220 | + * @return boolean|string | |
| 221 | 221 | */ | 
| 222 | 222 | public function canCreate($member = null, $context = array()) | 
| 223 | 223 |      { | 
| @@ -226,7 +226,7 @@ discard block | ||
| 226 | 226 | |
| 227 | 227 | /** | 
| 228 | 228 | * @param Member $member | 
| 229 | - * @return bool | |
| 229 | + * @return boolean|string | |
| 230 | 230 | */ | 
| 231 | 231 | public function canEdit($member = null) | 
| 232 | 232 |      { | 
| @@ -235,7 +235,7 @@ discard block | ||
| 235 | 235 | |
| 236 | 236 | /** | 
| 237 | 237 | * @param Member $member | 
| 238 | - * @return bool | |
| 238 | + * @return boolean|string | |
| 239 | 239 | */ | 
| 240 | 240 | public function canDelete($member = null) | 
| 241 | 241 |      { | 
| @@ -8,7 +8,6 @@ | ||
| 8 | 8 | use SilverStripe\Forms\Form; | 
| 9 | 9 | use SilverStripe\Forms\GridField\GridFieldDetailForm_ItemRequest; | 
| 10 | 10 | use SilverStripe\ORM\DataObject; | 
| 11 | -use SilverStripe\Security\Permission; | |
| 12 | 11 | use SilverStripe\View\Requirements; | 
| 13 | 12 | use Symbiote\AdvancedWorkflow\Extensions\WorkflowApplicable; | 
| 14 | 13 | use Symbiote\AdvancedWorkflow\Services\WorkflowService; |