text changes to registration mail content
[namibia] / module / PriceGuide / src / PriceGuide / Workflow.php
1 <?php
2 namespace PriceGuide;
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 = 'Stock';
21         /**
22          * @var string
23          */
24         protected $rootEntity    = 'Stock';
25         /**
26          * @var string
27          */
28         protected $rootIdField   = 'stock';
29         /**
30          * @var string
31          */
32         protected $initState     = 'Open4Offers';
33         /**
34          * @var string
35          */
36         protected $initTrigger   = false;
37         /**
38          * @var string
39          */
40         protected $primaryEntity = 'PriceGuide';
41         /**
42          * @var array
43          */
44         protected $entityMap = array(
45                         'PriceGuide' => '\PriceGuide\Entity\PriceGuide',
46                         'Stock'     => '\Stock\Entity\Stock'
47         );
48         /**
49          * @var array
50          */
51         protected $linkMap = array();
52         /**
53          * @var array
54          */
55         protected $listen = array();
56         /**
57          * @var array
58          */
59         protected $reclaim = array();
60         /**
61          * @var array
62          */
63         protected $stateLabel = array(
64                         'UpdateableOffers' => 'Updateable Offers',
65                         'ValidOffers'      => 'Valid Offers',
66                         'OfferAccepted'     => 'Offer Accepted'
67         );
68         /**
69          * @var array
70          */
71         protected $stateMap = array(
72                         'Global' => array(
73                                 'Actions' => array(
74                                         'PriceGuide.Grid'               => array(),
75                                         'PriceGuide.AddToTradeClub'     => array(),
76                                         'PriceGuide.SetupImperialClubs' => array(),
77                                         'AllowedMember.SelectList'      => array(),
78                                         'Club.SelectList'               => array(),
79                                         'Club.Grid'                     => array(),
80                                         'Club.Create'                   => array(),
81                                         'Club.Update'                   => array(),
82                                         'Club.Archive'                  => array(),
83                                         'Offer.Create'                  => array(),
84                                         'Offer.Update'                  => array(),
85                                         'Offer.Archive'                 => array(),
86                                         'Member.Grid'                   => array(),
87                                         'Member.MembershipGrid'         => array(),
88                                         'Member.Invite'                 => array(),
89                                         'Member.Update'                 => array(),
90                                         'Member.UpdateStatus'           => array(),
91                                         'Member.Archive'                => array(),
92                                         'Member.Accept'                 => array(),
93                                         'Member.Decline'                => array(),
94                                         'Member.Activate'               => array(),
95                                         'Member.Deactivate'             => array(),
96                                         'Invite.Grid'                   => array(),
97                                         'Invite.Archive'                => array(),
98                                         'Invite.View'                   => array(),
99                                         'Invite.Update'                 => array(),
100                                         'PricingHistory.Grid'                   => array()
101                                 )
102                         ),
103                         'Open4Offers' => array(
104                                 'Actions' => array(
105                                         'PriceGuide.View'                     => array(),
106                                         'PriceGuide.Remove'                           => array(),
107                                         'PriceGuide.Expire'                           => array(),
108                                         'Pdf.Print'                           => array(),
109                                         'PriceGuide.RequestBmwAccidentReport' => array(),
110                                         'PriceGuide.RequestAccidentReport'    => array(),
111                                         'Offer.List'                          => array(),
112                                         'Offer.Create'                        => array(),
113                                         'Offer.Update'                        => array(),
114                                         'Offer.Archive'                       => array(),
115                                         'Offer.Unarchive'                     => array(),
116                                         'PricingHistory.Grid'                   => array()
117                                 ),
118                                 'Routes' => array(
119                                         'Workflow.ReturnToStock'     => array(
120                                                         'Destination' => 'Stock.Handover'
121                                         ),
122                                         'Workflow.ReturnToValuation' => array(
123                                                         'Destination' => 'Valuation.Handover'
124                                         )
125                                 )
126                         ),
127                         'Updateable Offers' => array(
128                                 'Actions' => array(
129                                         'PriceGuide.View'                     => array(),
130                                         'PriceGuide.Remove'                           => array(),
131                                         'PriceGuide.Expire'                           => array(),
132                                         'Pdf.Print'                           => array(),
133                                         'Pdf.Print004'                        => array(),
134                                         'PriceGuide.RequestBmwAccidentReport' => array(),
135                                         'PriceGuide.RequestAccidentReport'    => array(),
136                                         'Offer.List'                          => array(),
137                                         'Offer.Create'                        => array(),
138                                         'Offer.Update'                        => array(),
139                                         'Offer.Archive'                       => array(),
140                                         'Offer.Unarchive'                     => array(),
141                                         'PricingHistory.Grid'                   => array()
142                                 ),
143                                 'Routes' => array(
144                                         'Workflow.ReturnToStock'     => array(
145                                                         'Destination' => 'Stock.Handover'
146                                         ),
147                                         'Workflow.ReturnToValuation' => array(
148                                                         'Destination' => 'Valuation.Handover'
149                                         )
150                                 )
151                         ),
152                         'Valid Offers' => array(
153                                 'Actions' => array(
154                                         'PriceGuide.View'                     => array(),
155                                         'Pdf.Print'                           => array(),
156                                         'Pdf.Print004'                        => array(),
157                                         'PriceGuide.RequestBmwAccidentReport' => array(),
158                                         'PriceGuide.RequestAccidentReport'    => array(),
159                                         'Offer.List'                          => array(),
160                                         'Offer.View'                          => array(),
161                                         'Offer.Archive'                       => array(),
162                                         'Offer.Unarchive'                     => array(),
163                                         'PricingHistory.Grid'                   => array()
164                                 ),
165                                 'Routes' => array(
166                                         'PriceGuide.OfferAccepted' => array(
167                                                         'Destination' => 'This.OfferAccepted'
168                                         ),
169                                         'Workflow.MoveToArchive'    => array(
170                                                         'Destination' => 'This.Archived'
171                                         ),
172                                         'Workflow.ReturnToStock'     => array(
173                                                         'Destination' => 'Stock.Handover'
174                                         ),
175                                         'Workflow.ReturnToValuation' => array(
176                                                         'Destination' => 'Valuation.Handover'
177                                         )
178                                 )
179                         ),
180                         'Offer Accepted' => array(
181                                 'Actions' => array(
182                                         'PriceGuide.View'                     => array(),
183                                         'Pdf.Print'                           => array(),
184                                         'Pdf.Print004'                        => array(),
185                                         'PriceGuide.RequestBmwAccidentReport' => array(),
186                                         'PriceGuide.RequestAccidentReport'    => array(),
187                                         'Offer.List'                          => array(),
188                                         'Offer.View'                          => array(),
189                                         'Offer.Archive'                       => array(),
190                                         'Offer.Unarchive'                     => array(),
191                                         'PricingHistory.Grid'                   => array()
192                                 ),
193                                 'Routes' => array(
194                                         'Workflow.MoveToArchive'    => array(
195                                                         'Destination' => 'This.Archived'
196                                         )
197                                 )
198                         ),
199                         'Archived' => array(
200                                 'Actions' => array(
201                                         'PriceGuide.View'  => array(),
202                                         'Pdf.Print'        => array(),
203                                         'Pdf.Print004'     => array(),
204                                         'Offer.List'       => array(),
205                                         'Offer.View'       => array(),
206                                         'Offer.Archive'    => array(),
207                                         'Offer.Unarchive'  => array(),
208                                         'PricingHistory.Grid'                   => array()
209                                 ),
210                                 'Routes' => array(
211                                         'Workflow.ReturnToStock'     => array(
212                                                         'Destination' => 'Stock.Handover'
213                                         ),
214                                         'Workflow.ReturnToValuation' => array(
215                                                         'Destination' => 'Valuation.Handover'
216                                         )
217                                 )
218                         )
219         );
220
221
222 }