Completed
Push — sf/composer-install-update ( a1e834 )
by Kiyotaka
10:44
created

MailTemplate::getMailHeader()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
/*
4
 * This file is part of EC-CUBE
5
 *
6
 * Copyright(c) LOCKON CO.,LTD. All Rights Reserved.
7
 *
8
 * http://www.lockon.co.jp/
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace Eccube\Entity;
15
16
use Doctrine\ORM\Mapping as ORM;
17
18
if (!class_exists('\Eccube\Entity\MailTemplate')) {
19
    /**
20
     * MailTemplate
21
     *
22
     * @ORM\Table(name="dtb_mail_template")
23
     * @ORM\InheritanceType("SINGLE_TABLE")
24
     * @ORM\DiscriminatorColumn(name="discriminator_type", type="string", length=255)
25
     * @ORM\HasLifecycleCallbacks()
26
     * @ORM\Entity(repositoryClass="Eccube\Repository\MailTemplateRepository")
27
     */
28
    class MailTemplate extends \Eccube\Entity\AbstractEntity
29
    {
30
        /**
31
         * @return string
32
         */
33
        public function __toString()
34
        {
35
            return $this->getName() ? $this->getName() : '';
36
        }
37
38
        /**
39
         * @var int
40
         *
41
         * @ORM\Column(name="id", type="integer", options={"unsigned":true})
42
         * @ORM\Id
43
         * @ORM\GeneratedValue(strategy="IDENTITY")
44
         */
45
        private $id;
46
47
        /**
48
         * @var string|null
49
         *
50
         * @ORM\Column(name="name", type="string", length=255, nullable=true)
51
         */
52
        private $name;
53
54
        /**
55
         * @var string|null
56
         *
57
         * @ORM\Column(name="file_name", type="string", length=255, nullable=true)
58
         */
59
        private $file_name;
60
61
        /**
62
         * @var string|null
63
         *
64
         * @ORM\Column(name="mail_subject", type="string", length=255, nullable=true)
65
         */
66
        private $mail_subject;
67
68
        /**
69
         * @var \DateTime
70
         *
71
         * @ORM\Column(name="create_date", type="datetimetz")
72
         */
73
        private $create_date;
74
75
        /**
76
         * @var \DateTime
77
         *
78
         * @ORM\Column(name="update_date", type="datetimetz")
79
         */
80
        private $update_date;
81
82
        /**
83
         * @var \Eccube\Entity\Member
84
         *
85
         * @ORM\ManyToOne(targetEntity="Eccube\Entity\Member")
86
         * @ORM\JoinColumns({
87
         *   @ORM\JoinColumn(name="creator_id", referencedColumnName="id")
88
         * })
89
         */
90
        private $Creator;
91
92
        /**
93
         * Get id.
94
         *
95
         * @return int
96
         */
97
        public function getId()
98
        {
99
            return $this->id;
100
        }
101
102
        /**
103
         * Set name.
104
         *
105
         * @param string|null $name
106
         *
107
         * @return MailTemplate
108
         */
109
        public function setName($name = null)
110
        {
111
            $this->name = $name;
112
113
            return $this;
114
        }
115
116
        /**
117
         * Get name.
118
         *
119
         * @return string|null
120
         */
121
        public function getName()
122
        {
123
            return $this->name;
124
        }
125
126
        /**
127
         * Set fileName.
128
         *
129
         * @param string|null $fileName
130
         *
131
         * @return MailTemplate
132
         */
133
        public function setFileName($fileName = null)
134
        {
135
            $this->file_name = $fileName;
136
137
            return $this;
138
        }
139
140
        /**
141
         * Get fileName.
142
         *
143
         * @return string|null
144
         */
145
        public function getFileName()
146
        {
147
            return $this->file_name;
148
        }
149
150
        /**
151
         * Set mailSubject.
152
         *
153
         * @param string|null $mailSubject
154
         *
155
         * @return MailTemplate
156
         */
157
        public function setMailSubject($mailSubject = null)
158
        {
159
            $this->mail_subject = $mailSubject;
160
161
            return $this;
162
        }
163
164
        /**
165
         * Get mailSubject.
166
         *
167
         * @return string|null
168
         */
169
        public function getMailSubject()
170
        {
171
            return $this->mail_subject;
172
        }
173
174
        /**
175
         * Set createDate.
176
         *
177
         * @param \DateTime $createDate
178
         *
179
         * @return MailTemplate
180
         */
181
        public function setCreateDate($createDate)
182
        {
183
            $this->create_date = $createDate;
184
185
            return $this;
186
        }
187
188
        /**
189
         * Get createDate.
190
         *
191
         * @return \DateTime
192
         */
193
        public function getCreateDate()
194
        {
195
            return $this->create_date;
196
        }
197
198
        /**
199
         * Set updateDate.
200
         *
201
         * @param \DateTime $updateDate
202
         *
203
         * @return MailTemplate
204
         */
205
        public function setUpdateDate($updateDate)
206
        {
207
            $this->update_date = $updateDate;
208
209
            return $this;
210
        }
211
212
        /**
213
         * Get updateDate.
214
         *
215
         * @return \DateTime
216
         */
217
        public function getUpdateDate()
218
        {
219
            return $this->update_date;
220
        }
221
222
        /**
223
         * Set creator.
224
         *
225
         * @param \Eccube\Entity\Member|null $creator
226
         *
227
         * @return MailTemplate
228
         */
229
        public function setCreator(\Eccube\Entity\Member $creator = null)
230
        {
231
            $this->Creator = $creator;
232
233
            return $this;
234
        }
235
236
        /**
237
         * Get creator.
238
         *
239
         * @return \Eccube\Entity\Member|null
240
         */
241
        public function getCreator()
242
        {
243
            return $this->Creator;
244
        }
245
    }
246
}
247