initial commit
[namibia] / module / Company / src / Company / Workflow.php
1 <?php
2 namespace Company;
3
4
5
6 /**
7  * A workflow.
8  * @author andre.fourie
9  */
10 class Workflow extends \Workspace\Workflow
11 {
12
13         /**
14          * @var string
15          */
16         protected $namespace = __NAMESPACE__;
17         /**
18          * @var string
19          */
20         protected $parentFeature = false;
21         /**
22          * @var string
23          */
24         protected $initState    = 'This.New';
25         /**
26          * @var string
27          */
28         protected $initTrigger  = 'Company.Create';
29         /**
30          * @var string
31          */
32         protected $primaryEntity = 'Company';
33         /**
34          * @var array
35          */
36         protected $entityMap = array(
37                         'Company' => '\Company\Entity\Company'
38         );
39         /**
40          * @var array
41          */
42         protected $linkMap = array();
43         /**
44          * @var array
45          */
46         protected $listen = array();
47         /**
48          * @var array
49          */
50         protected $reclaim = array();
51         /**
52          * @var array
53          */
54         protected $stateMap = array(
55                         'Global' => array(
56                                 'Actions' => array(
57                                         'Company.Grid'                  => array(),
58                                         'Company.SelectGrid'            => array(),
59                                         'Company.List'                  => array(),
60                                         'Company.Create'                => array(),
61                                         'Company.SelectList'            => array(),
62                                         'Company.InviteSelectList'      => array(),
63                                         'Company.TcDealerSelectList'    => array(),
64                                         'Company.TradeCenterSelectList' => array(),
65                     'Company.StockAuctionReportSelectList' => array(),
66                                         'Group.SelectList'              => array(),
67                                         'Group.JoinedSelectList'        => array(),
68                                         'Group.List'                    => array(),
69                                         'Group.Create'                  => array(),
70                                         'Group.Update'                  => array(),
71                     'Group.StockAuctionSelectList'                  => array(),
72                                         'GroupDivision.SelectList'      => array(),
73                                         'GroupDivision.JoinedSelectList' => array(),
74                                         'GroupDivision.List'            => array(),
75                                         'GroupDivision.Create'          => array(),
76                                         'GroupDivision.Update'          => array(),
77                                         'FoundMethod.SelectList'        => array(),
78                                         'FoundMethodDetail.SelectList'  => array(),
79                                         'CompanyRetail.SelectList'      => array(),
80                                         'CompanyRetail.Grid'            => array(),
81                                         'CompanyRetail.Create'          => array(),
82                                         'CompanyRetail.Update'          => array()
83                                 )
84                         ),
85                         'New' => array(
86                                 'Actions' => array(
87                                         'Company.View'           => array(),
88                                         'Company.AdminUpdate'    => array(),
89                                         'Company.Update'         => array(),
90                                         'Company.RemoveDocument' => array()
91                                 ),
92                                 'Routes' => array(
93                                         'Company.MoveToPending'    => array(
94                                                         'Destination' => 'This.Pending'
95                                         ),
96                                         'Company.MoveToActive'    => array(
97                                                         'Destination' => 'This.Active'
98                                         ),
99                                         'Workflow.MoveToSuspended'    => array(
100                                                         'Destination' => 'This.Suspended'
101                                         ),
102                                         'Company.MoveToDeclined'    => array(
103                                                         'Destination' => 'This.Declined'
104                                         ),
105                                         'Workflow.MoveToArchive'    => array(
106                                                         'Destination' => 'This.Archived'
107                                         )
108                                 )
109                         ),
110                         'Pending' => array(
111                                 'Actions' => array(
112                                         'Company.View'           => array(),
113                                         'Company.AdminUpdate'    => array(),
114                                         'Company.Update'         => array(),
115                                         'Company.RemoveDocument' => array()
116                                 ),
117                                 'Routes' => array(
118                                         'Company.MoveToActive'    => array(
119                                                         'Destination' => 'This.Active'
120                                         ),
121                                         'Workflow.MoveToSuspended'    => array(
122                                                         'Destination' => 'This.Suspended'
123                                         ),
124                                         'Company.MoveToDeclined'    => array(
125                                                         'Destination' => 'This.Declined'
126                                         ),
127                                         'Workflow.MoveToArchive'    => array(
128                                                         'Destination' => 'This.Archived'
129                                         )
130                                 )
131                         ),
132                         'Active' => array(
133                                 'Actions' => array(
134                                         'Company.View'           => array(),
135                                         'Company.Update'         => array(),
136                                         'Company.AdminUpdate'    => array(),
137                                         'Company.RemoveDocument' => array()
138                                 ),
139                                 'Routes' => array(
140                                         'Workflow.MoveToSuspended'    => array(
141                                                         'Destination' => 'This.Suspended'
142                                         ),
143                                         'Company.MoveToDeclined'    => array(
144                                                         'Destination' => 'This.Declined'
145                                         ),
146                                         'Workflow.MoveToArchive'    => array(
147                                                         'Destination' => 'This.Archived'
148                                         )
149                                 )
150                         ),
151                         'Suspended' => array(
152                                 'Actions' => array(
153                                         'Company.View'           => array(),
154                                         'Company.AdminUpdate'    => array(),
155                                         'Company.Update'         => array(),
156                                         'Company.RemoveDocument' => array()
157                                 ),
158                                 'Routes' => array(
159                                         'Company.MoveToPending'    => array(
160                                                         'Destination' => 'This.Pending'
161                                         ),
162                                         'Workflow.MoveToActive'    => array(
163                                                         'Destination' => 'This.Active'
164                                         ),
165                                         'Workflow.MoveToDeclined'    => array(
166                                                         'Destination' => 'This.Declined'
167                                         ),
168                                         'Workflow.MoveToArchive'    => array(
169                                                         'Destination' => 'This.Archived'
170                                         )
171                                 )
172                         ),
173                         'Declined' => array(
174                                 'Actions' => array(
175                                         'Company.View'           => array(),
176                                         'Company.AdminUpdate'    => array(),
177                                         'Company.Update'         => array(),
178                                         'Company.RemoveDocument' => array()
179                                 ),
180                                 'Routes' => array(
181                                         'Company.MoveToPending'    => array(
182                                                         'Destination' => 'This.Pending'
183                                         ),
184                                         'Company.MoveToActive'    => array(
185                                                         'Destination' => 'This.Active'
186                                         ),
187                                         'Workflow.MoveToSuspended'    => array(
188                                                         'Destination' => 'This.Suspended'
189                                         ),
190                                         'Workflow.MoveToArchive'    => array(
191                                                         'Destination' => 'This.Archived'
192                                         )
193                                 )
194                         ),
195                         'Archived' => array(
196                                 'Actions' => array(
197                                         'Company.View'           => array(),
198                                         'Company.AdminUpdate'    => array(),
199                                         'Company.Update'         => array(),
200                                         'Company.RemoveDocument' => array()
201                                 ),
202                                 'Routes' => array(
203                                         'Workflow.MoveToActive' => array(
204                                                         'Destination' => 'This.Active'
205                                         )
206                                 )
207                         )
208         );
209
210
211 }