@@ -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 | { |
@@ -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(); |
@@ -603,7 +603,7 @@ discard block |
||
| 603 | 603 | /** |
| 604 | 604 | * Does this action restrict the publishing of a document? |
| 605 | 605 | * |
| 606 | - * @return boolean |
|
| 606 | + * @return boolean|null |
|
| 607 | 607 | */ |
| 608 | 608 | public function canPublishTarget() |
| 609 | 609 | { |
@@ -616,7 +616,7 @@ discard block |
||
| 616 | 616 | * Get the current set of transitions that are valid for the current workflow state, |
| 617 | 617 | * and are available to the current user. |
| 618 | 618 | * |
| 619 | - * @return array |
|
| 619 | + * @return ArrayList |
|
| 620 | 620 | */ |
| 621 | 621 | public function validTransitions() |
| 622 | 622 | { |
@@ -750,9 +750,9 @@ discard block |
||
| 750 | 750 | * to view WorkflowInstances within GridFields |
| 751 | 751 | * @see {@link $this->userHasAccess()} |
| 752 | 752 | * |
| 753 | - * @param number $recordID |
|
| 753 | + * @param integer $recordID |
|
| 754 | 754 | * @param number $userID |
| 755 | - * @param number $wasPublished |
|
| 755 | + * @param integer $wasPublished |
|
| 756 | 756 | * @return boolean |
| 757 | 757 | */ |
| 758 | 758 | public function getVersionedConnection($recordID, $userID, $wasPublished = 0) |
@@ -789,7 +789,7 @@ discard block |
||
| 789 | 789 | /** |
| 790 | 790 | * Tells us if $member has had permissions over some part of the current WorkflowInstance. |
| 791 | 791 | * |
| 792 | - * @param $member |
|
| 792 | + * @param Member $member |
|
| 793 | 793 | * @return WorkflowAction|boolean |
| 794 | 794 | */ |
| 795 | 795 | 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 | { |
@@ -328,7 +328,8 @@ |
||
| 328 | 328 | /** |
| 329 | 329 | * Gets the history of a workflow instance |
| 330 | 330 | * |
| 331 | - * @return DataObjectSet |
|
| 331 | + * @param integer $limit |
|
| 332 | + * @return \SilverStripe\ORM\DataList|null |
|
| 332 | 333 | */ |
| 333 | 334 | public function getWorkflowHistory($limit = null) |
| 334 | 335 | { |
@@ -535,7 +535,7 @@ |
||
| 535 | 535 | * disabled. |
| 536 | 536 | * |
| 537 | 537 | * @param Member $member |
| 538 | - * @return bool|null |
|
| 538 | + * @return false|null |
|
| 539 | 539 | */ |
| 540 | 540 | public function canEdit($member) |
| 541 | 541 | { |
@@ -33,6 +33,10 @@ |
||
| 33 | 33 | |
| 34 | 34 | protected $definition; |
| 35 | 35 | |
| 36 | + /** |
|
| 37 | + * @param string $name |
|
| 38 | + * @param string $title |
|
| 39 | + */ |
|
| 36 | 40 | public function __construct($name, $title, WorkflowDefinition $definition) |
| 37 | 41 | { |
| 38 | 42 | $this->definition = $definition; |