initial commit
[namibia] / module / Newsletter / src / Newsletter / Workflow.php
1 <?php
2 namespace Newsletter;
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 = 'Utility';
21         /**
22          * @var string
23          */
24         protected $rootEntity    = 'Newsletter';
25         /**
26          * @var string
27          */
28         protected $rootIdField   = 'newsletter';
29         /**
30          * @var string
31          */
32         protected $initState     = 'Active';
33         /**
34          * @var string
35          */
36         protected $initTrigger   = false;
37         /**
38          * @var string
39          */
40         protected $primaryEntity = 'Newsletter';
41         /**
42          * @var array
43          */
44         protected $entityMap = array(
45                         'Newsletter'            => '\Newsletter\Entity\Newsletter',
46                         'Attachment'            => '\Utility\Entity\Attachment'
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         /**
65          * @var array
66          */
67         protected $stateMap = array(
68                         'Global' => array(
69                                 'Actions' => array(
70                                         'Newsletter.Grid'               => array(),
71                                         'Newsletter.Create'                     => array()
72                                 )
73                         ),
74                         'Draft' => array(
75                                 'Actions' => array(
76                                         'Newsletter.View'                               => array(),
77                                         'Newsletter.Update'                     => array()
78                                 ),
79                                 'Routes' => array(
80                                         'Workflow.Archive'    => array(
81                                                         'Destination' => 'This.Archived'
82                                         )
83                                 )
84                         ),
85                         'Sending' => array(
86                                 'Actions' => array(
87                                         'Newsletter.View'                               => array(),
88                                         'Newsletter.Update'                     => array()
89                                 )
90                         ),
91                         'Sent' => array(
92                                 'Actions' => array(
93                                         'Newsletter.View'                               => array(),
94                                         'Newsletter.Update'                     => array()
95                                 ),
96                                 'Routes' => array(
97                                         'Workflow.Archive'    => array(
98                                                         'Destination' => 'This.Archived'
99                                         )
100                                 )
101                         ),
102                         'Archived' => array(
103                                 'Actions' => array(
104                                         'Newsletter.Update'                     => array()
105                                 )
106                         )
107         );
108
109
110 }