@@ -214,9 +214,8 @@ |
||
214 | 214 | /** |
215 | 215 | * Get WorkflowInstance Target objects to show for users in initial gridfield(s) |
216 | 216 | * |
217 | - * @param Member $member |
|
218 | 217 | * @param string $fieldName The name of the gridfield that determines which dataset to return |
219 | - * @return DataList |
|
218 | + * @return ArrayList |
|
220 | 219 | * @todo Add the ability to see embargo/expiry dates in report-gridfields at-a-glance if QueuedJobs module installed |
221 | 220 | */ |
222 | 221 | public function userObjects(Member $user, $fieldName) { |
@@ -95,7 +95,7 @@ |
||
95 | 95 | * Used for pushing data to the browser to prompt for download |
96 | 96 | * |
97 | 97 | * @param string $str |
98 | - * @return number $bytes |
|
98 | + * @return integer $bytes |
|
99 | 99 | */ |
100 | 100 | public function getExportSize($str) { |
101 | 101 | return mb_strlen($str, 'UTF-8'); |
@@ -79,7 +79,7 @@ |
||
79 | 79 | * - required fields from the Context Object |
80 | 80 | * - Actions from the connected WorkflowTransitions |
81 | 81 | * |
82 | - * @return Form |
|
82 | + * @return null|FrontendWorkflowForm |
|
83 | 83 | */ |
84 | 84 | public function Form(){ |
85 | 85 |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | * if null is returned from this method. |
54 | 54 | * |
55 | 55 | * @param DataObject $target |
56 | - * @return bool |
|
56 | + * @return boolean|null |
|
57 | 57 | */ |
58 | 58 | public function canEditTarget(DataObject $target) { |
59 | 59 | return null; |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | * Does this action restrict viewing of the document? |
64 | 64 | * |
65 | 65 | * @param DataObject $target |
66 | - * @return bool |
|
66 | + * @return boolean|null |
|
67 | 67 | */ |
68 | 68 | public function canViewTarget(DataObject $target) { |
69 | 69 | return null; |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | * Does this action restrict the publishing of a document? |
74 | 74 | * |
75 | 75 | * @param DataObject $target |
76 | - * @return bool |
|
76 | + * @return boolean|null |
|
77 | 77 | */ |
78 | 78 | public function canPublishTarget(DataObject $target) { |
79 | 79 | return null; |
@@ -43,6 +43,7 @@ discard block |
||
43 | 43 | |
44 | 44 | /** |
45 | 45 | * Gets fields for when this is part of an active workflow |
46 | + * @param FieldList $fields |
|
46 | 47 | */ |
47 | 48 | public function updateWorkflowFields($fields) { |
48 | 49 | if ($this->BaseAction()->AllowCommenting) { |
@@ -50,6 +51,9 @@ discard block |
||
50 | 51 | } |
51 | 52 | } |
52 | 53 | |
54 | + /** |
|
55 | + * @param FieldList $fields |
|
56 | + */ |
|
53 | 57 | public function updateFrontendWorkflowFields($fields){ |
54 | 58 | if ($this->BaseAction()->AllowCommenting) { |
55 | 59 | $fields->push(new TextareaField('WorkflowActionInstanceComment', _t('WorkflowAction.FRONTENDCOMMENT', 'Comment'))); |
@@ -82,6 +86,9 @@ discard block |
||
82 | 86 | return $obj; |
83 | 87 | } |
84 | 88 | |
89 | + /** |
|
90 | + * @param FieldList $actions |
|
91 | + */ |
|
85 | 92 | public function updateFrontEndWorkflowActions($actions) { |
86 | 93 | $ba = $this->BaseAction(); |
87 | 94 |
@@ -392,7 +392,7 @@ discard block |
||
392 | 392 | /** |
393 | 393 | * |
394 | 394 | * @param Member $member |
395 | - * @return boolean |
|
395 | + * @return boolean|null |
|
396 | 396 | */ |
397 | 397 | public function canView($member=null) { |
398 | 398 | return $this->userHasAccess($member); |
@@ -437,6 +437,7 @@ discard block |
||
437 | 437 | * Checks whether the passed user is able to view this ModelAdmin |
438 | 438 | * |
439 | 439 | * @param $memberID |
440 | + * @param Member|null $member |
|
440 | 441 | */ |
441 | 442 | protected function userHasAccess($member) { |
442 | 443 | if (!$member) { |
@@ -428,6 +428,7 @@ discard block |
||
428 | 428 | * workflow |
429 | 429 | * |
430 | 430 | * @param $memberID |
431 | + * @param Member|null $member |
|
431 | 432 | */ |
432 | 433 | protected function userHasAccess($member) { |
433 | 434 | if (!$member) { |
@@ -479,7 +480,7 @@ discard block |
||
479 | 480 | /** |
480 | 481 | * Does this action restrict the publishing of a document? |
481 | 482 | * |
482 | - * @return boolean |
|
483 | + * @return boolean|null |
|
483 | 484 | */ |
484 | 485 | public function canPublishTarget() { |
485 | 486 | if ($this->CurrentActionID) { |
@@ -491,7 +492,7 @@ discard block |
||
491 | 492 | * Get the current set of transitions that are valid for the current workflow state, |
492 | 493 | * and are available to the current user. |
493 | 494 | * |
494 | - * @return array |
|
495 | + * @return ArrayList |
|
495 | 496 | */ |
496 | 497 | public function validTransitions() { |
497 | 498 | $action = $this->CurrentAction(); |
@@ -647,7 +648,7 @@ discard block |
||
647 | 648 | /** |
648 | 649 | * Tells us if $member has had permissions over some part of the current WorkflowInstance. |
649 | 650 | * |
650 | - * @param $member |
|
651 | + * @param Member $member |
|
651 | 652 | * @return \WorkflowAction | boolean |
652 | 653 | */ |
653 | 654 | public function getMostRecentActionForUser($member = null) { |
@@ -285,6 +285,7 @@ |
||
285 | 285 | /** |
286 | 286 | * Gets the history of a workflow instance |
287 | 287 | * |
288 | + * @param integer $limit |
|
288 | 289 | * @return DataObjectSet |
289 | 290 | */ |
290 | 291 | public function getWorkflowHistory($limit = null) { |
@@ -15,6 +15,10 @@ |
||
15 | 15 | |
16 | 16 | protected $definition; |
17 | 17 | |
18 | + /** |
|
19 | + * @param string $name |
|
20 | + * @param string $title |
|
21 | + */ |
|
18 | 22 | public function __construct($name, $title, WorkflowDefinition $definition) { |
19 | 23 | $this->definition = $definition; |
20 | 24 | $this->addExtraClass('workflow-field'); |