SubmissionCollectionInterface.php
3.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<?php
use NF_Exports_SubmissionCollectionFilterParameters as SubmissionCollectionFilterParameters;
use NF_Exports_Interfaces_SingleSubmissionInterface as SingleSubmissionInterface;
/**
* Contract defining required methods for handling submission collection
*
*/
interface NF_Exports_Interfaces_SubmissionCollectionInterface {
/**
* Return the form Id
* @return int
*/
public function getFormId();
/**
* Return the form title
* @return string
*/
public function getFormTitle();
/**
* Return count of submissions, exported, and unread
*/
public function getCounts():array ;
/**
* Set all parameters using NF_Database_Models_SubmissionCollectionInterfaceParameters
*
* Using the object ensures all properties are set, with known defaults;
* this enables the requesting class to set only values that concerns it
* without needing to set any other value or default. The Submission
* Collection class knows that all values have valid parameters and can
* immediately run the filter.
*
* @param SubmissionCollectionFilterParameters $params
*/
public function filterByParameters(/* SubmissionCollectionFilterParameters */ $params)/* :NF_Database_Models_SubmissionCollectionInterface*/ ;
/**
* Set start and end dates to filter submissions
* @param int|null $startDate Starting date
* @param int|null $endDate Ending date
*/
public function setDateParameters($startDate = null, $endDate = null)/* :NF_Exports_Interfaces_SubmissionCollectionInterface */;
/**
* Set parameter to filter submissions by `isUnread` = true or false
*
* @param bool $isUnread
*/
public function setIsUnreadParameter(bool $isUnread=null)/* :NF_Exports_Interfaces_SubmissionCollectionInterface */;
/**
* Set parameter to filter submissions by `previouslyExported` = true or false
*
* @param bool $previouslyExported
*/
public function setPreviouslyExportedParameter(bool $previouslyExported=null)/* :NF_Exports_Interfaces_SubmissionCollectionInterface */;
/**
* Set max number of submissions to return in a request
*
* @param int $maxReturnCount
*/
public function setMaxReturnCount($maxReturnCount=null)/* :NF_Exports_Interfaces_SubmissionCollectionInterface */;
/**
* Filter collection of submissions based on previously set parameters
*
* @return array
*/
public function filterSubmissions()/* :NF_Exports_Interfaces_SubmissionCollectionInterface */;
/**
* Return submission collection array
* @return SingleSubmissionInterface[]
*/
public function getSubmissions() /* : SingleSubmissionInterface[] */;
/**
* Return array of submission Ids in the collection
*/
public function getSubmissionIds() /* :array */;
/**
* Return array of field labels keyed on field keys
*
* If hiddenFieldTypes array is set, labels filtered to hide those types
*
* @param bool $useAdminLabels Optionally use admin_labels
* @return array
*/
public function getLabels(?bool $useAdminLabels = false)/* : array */;
/**
* Return array of field types keyed on field keys
*
* @return array
*/
public function getFieldTypes()/* : array */;
/**
* Return array of field Ids keyed on field keys
*/
public function getFieldIds()/* :array */;
/**
* Set field types to be removed before output
*
* Provided as indexed array of NF field types
*
* @param array $hidden
*/
public function setHiddenFieldTypes(array $hidden)/* : NF_Exports_Interfaces_SubmissionCollectionInterface */;
}