text changes to registration mail content
[namibia] / module / Newsletter / src / Newsletter / DataBin / Newsletter.php
1 <?php
2 namespace Newsletter\DataBin;
3
4
5
6 /**
7  * Manage Newsletter data.
8  * @author andre.fourie
9  */
10 class Newsletter extends \Workspace\Service\DataBin
11 {
12
13         /**
14          * @var array
15          */
16         protected $meta = array(
17             'Base'        => 'Newsletter',
18             'DatasetName' => 'newsletters',
19             'Entity'      => '\Newsletter\Entity\Newsletter',
20             'References'  => array(
21                 'attachment' => '\Utility\Entity\Attachment'
22             ),
23             'Dependants'  => array()
24         );
25         /**
26          * @var array
27         */
28         protected $metaGrid = array(
29             'Type'          => 'Grid',
30             'Contract'      => 'Recurring',
31             'RequiredInput' => array(),
32             'OptionalInput' => array(
33                 'Grid'  => array(
34                     'NumberOfRecords' => 'Integer',
35                     'Page'            => 'Integer',
36                     'Filter'          => 'Array',
37                     'OrderBy'         => 'Array'
38                 )
39             ),
40             'Base'            => 'newsletter',
41             'NumberOfRecords' => 10,
42         'Query'           => 'SELECT [SELECTION]
43                                               FROM \Newsletter\Entity\Newsletter newsletter
44                                                           LEFT JOIN newsletter.attachment attachment
45                                               [WHERE] [ORDER]',
46             'Selection'       => 'newsletter, attachment',
47             'Filter'          => array(),
48             'OrderBy'         => array('newsletter.created' => 'DESC'),
49             'Fields'          => array(
50                                                 'id',
51                                                 'subject',
52                                                 'created' => 'DateTime',
53                                                 'updated' => 'DateTime',
54                                                 'sentTo',
55                                                 'jobState',
56                                                 'attachment' => array(
57                                                     'id',
58                                                     'filename'
59                                                 )
60                                             )
61         );
62         /**
63          * @var array
64          */
65         protected $metaView = array(
66             'Type'        => 'Update',
67             'Contract'    => 'Recurring',
68             'Expand'      => array(
69                                         'attachment'
70             ),
71             'RequiredInput' => array(),
72             'OptionalInput' => array()
73         );
74         /**
75          * @var array
76         */
77         protected $metaCreate = array(
78                         'Type'                  => 'Create',
79                         'Contract'              => 'Recurring',
80                         'Options'       => array(
81                                         'Boolean' => array(
82                                                         'SaveDraft' => false,
83                                                         'TestDraft' => false,
84                                                         'Send'          => false
85                                         )
86                         ),
87                         'ExecuteAfter'  => array(
88                                         'sendNewsletter'
89                         ),
90                         'RequiredInput' => array(
91                                         'Newsletter' => array(
92                                                         'subject'       => 'String100',
93                                                         'content'               => 'LongText'
94                                         )
95                         ),
96                         'OptionalInput' => array(
97                                         'Newsletter' => array(
98                                                         'attachment'    => 'Id'
99                                         )
100                         )
101         );
102         /**
103          * @var array
104         */
105         protected $metaUpdate = array(
106                         'Type'                  => 'Update',
107                         'Contract'              => 'UseOnce',
108                         'Options'       => array(
109                                         'Boolean' => array(
110                                                         'SaveDraft' => false,
111                                                         'TestDraft' => false,
112                                                         'Send'          => false
113                                         )
114                         ),
115                         'ExecuteAfter'  => array(
116                                         'sendNewsletter'
117                         ),
118                         'RequiredInput' => array(
119                                         'Newsletter' => array(
120                                                         'subject'       => 'String100',
121                                                         'content'               => 'LongText'
122                                         )
123                         ),
124                         'OptionalInput' => array(
125                                         'Newsletter' => array(
126                                                         'attachment'    => 'Id'
127                                         )
128                         )
129         );
130
131
132 }