text changes to registration mail content
[namibia] / module / Utility / src / Utility / Entity / RepeaterTemplate.php
1 <?php
2 namespace Utility\Entity;
3
4 use Doctrine\ORM\Mapping as ORM;
5
6
7
8 /**
9  * A notification template.
10  * @ORM\Entity
11  * @ORM\Table(name="lib_repeater_template")
12  */
13 class RepeaterTemplate
14 {
15
16         /**
17          * Can archive records.
18          */
19         const ARCHIVE = false;
20         /**
21          * Pull Synchronization Strategy for this table.
22          */
23         const PULL_SYNCH_STRATEGY = false;
24         /**
25          * Push Synchronization Strategy for this table.
26          */
27         const PUSH_SYNCH_STRATEGY = false;
28
29         /**
30          * @ORM\Id
31          * @ORM\Column(type="integer");
32          * @ORM\GeneratedValue(strategy="AUTO")
33          */
34         protected $id;
35
36         /**
37          * @ORM\Column(type="string", length=50, name="group_field")
38          */
39         protected $groupField;
40
41         /**
42          * @ORM\Column(type="text", name="group_repeater")
43          */
44         protected $groupRepeater;
45
46         /**
47          * @ORM\Column(type="text", name="row_repeater_odd")
48          */
49         protected $rowRepeaterOdd;
50
51         /**
52          * @ORM\Column(type="text", name="row_repeater_even")
53          */
54         protected $rowRepeaterEven;
55
56
57         /**
58          * Magic getter to expose protected properties.
59          * @param string $property
60          * @return mixed
61          */
62         public function __get($property)
63         {
64                 return $this->$property;
65         }
66
67         /**
68          * Magic setter to save protected properties.
69          * @param string $property
70          * @param mixed $value
71          */
72         public function __set($property, $value)
73         {
74                 $this->$property = $value;
75         }
76
77         /**
78          * Convert the object to an array.
79          * @param array $expand
80          * @return array
81          */
82         public function toArray(array $expand = array())
83         {
84                 return array(
85                                 'id'              => $this->id,
86                                 'groupField'      => $this->groupField,
87                                 'groupRepeater'   => $this->groupRepeater,
88                                 'rowRepeaterOdd'  => $this->rowRepeaterOdd,
89                                 'rowRepeaterEven' => $this->rowRepeaterEven
90                 );
91         }
92
93         /**
94          * Populate from an array.
95          * @param array $data
96          */
97         public function fromArray($data = array())
98         {
99                 isset($data['id'])
100                         && $this->id = $data['id'];
101                 isset($data['groupField'])
102                         && $this->groupField  = $data['groupField'];
103                 isset($data['groupRepeater'])
104                         && $this->groupRepeater  = $data['groupRepeater'];
105                 isset($data['rowRepeaterOdd'])
106                         && $this->rowRepeaterOdd  = $data['rowRepeaterOdd'];
107                 isset($data['rowRepeaterEven'])
108                         && $this->rowRepeaterEven  = $data['rowRepeaterEven'];
109         }
110
111 }