GolfCourse::getComment()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
ccs 0
cts 0
cp 0
crap 2
1
<?php
2
namespace TNM\GolfCourses\Domain\Model;
3
4
/***************************************************************
5
 *
6
 *  Copyright notice
7
 *
8
 *  (c) 2016 Tomas Norre Mikkelsen <[email protected]>
9
 *
10
 *  All rights reserved
11
 *
12
 *  This script is part of the TYPO3 project. The TYPO3 project is
13
 *  free software; you can redistribute it and/or modify
14
 *  it under the terms of the GNU General Public License as published by
15
 *  the Free Software Foundation; either version 3 of the License, or
16
 *  (at your option) any later version.
17
 *
18
 *  The GNU General Public License can be found at
19
 *  http://www.gnu.org/copyleft/gpl.html.
20
 *
21
 *  This script is distributed in the hope that it will be useful,
22
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
23
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
24
 *  GNU General Public License for more details.
25
 *
26
 *  This copyright notice MUST APPEAR in all copies of the script!
27
 ***************************************************************/
28
29
use SJBR\StaticInfoTables\Domain\Model\Country;
30
31
/**
32
 * GolfCourse
33
 */
34
class GolfCourse extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
35
{
36
37
    /**
38
     * name
39
     *
40
     * @var string
41
     */
42
    protected $name = '';
43
44
    /**
45
     * website
46
     *
47
     * @var string
48
     */
49
    protected $website = '';
50
51
    /**
52
     * comment
53
     *
54
     * @var string
55
     */
56
    protected $comment = '';
57
58
    /**
59
     * country
60
     *
61
     * @var int
62
     */
63
    protected $country = 0;
64
65
    /**
66
     * logo
67
     *
68
     * @var \TYPO3\CMS\Extbase\Domain\Model\FileReference
69
     */
70
    protected $logo = null;
71
72
    /**
73
     * @var string
74
     */
75
    protected $longitude = '';
76 1
77
    /**
78 1
     * @var string
79
     */
80
    protected $latitude = '';
81
82
    /**
83
     * @var \SJBR\StaticInfoTables\Domain\Repository\CountryRepository
84
     * @TYPO3\CMS\Extbase\Annotation\Inject
85
     */
86
    protected $countryRepository;
87 1
88
    /**
89 1
     * Returns the name
90 1
     *
91
     * @return string $name
92
     */
93
    public function getName()
94
    {
95
        return $this->name;
96
    }
97 1
98
    /**
99 1
     * Sets the name
100
     *
101
     * @param string $name
102
     * @return void
103
     */
104
    public function setName($name)
105
    {
106
        $this->name = $name;
107
    }
108 1
109
    /**
110 1
     * Returns the website
111 1
     *
112
     * @return string $website
113
     */
114
    public function getWebsite()
115
    {
116
        return $this->website;
117
    }
118 1
119
    /**
120 1
     * Sets the website
121
     *
122
     * @param string $website
123
     * @return void
124
     */
125
    public function setWebsite($website)
126
    {
127
        $this->website = $website;
128
    }
129 1
130
    /**
131 1
     * Returns the comment
132 1
     *
133
     * @return string $comment
134
     */
135
    public function getComment()
136
    {
137
        return $this->comment;
138
    }
139 2
140
    /**
141 2
     * Sets the comment
142
     *
143
     * @param string $comment
144
     * @return void
145
     */
146
    public function setComment($comment)
147
    {
148
        $this->comment = $comment;
149
    }
150 1
151
    /**
152 1
     * Returns the country
153 1
     *
154
     * @return int $country
155
     */
156
    public function getCountry()
157
    {
158
        return $this->country;
159
    }
160 1
161
    /**
162 1
     * Sets the country
163
     *
164
     * @param int $country
165
     * @return void
166
     */
167
    public function setCountry($country)
168
    {
169
        $this->country = $country;
170
    }
171 1
172
    /**
173 1
     * @return string
174 1
     */
175
    public function getCountryShortEnName()
176
    {
177
        /** @var Country $country */
178
        $country = $this->countryRepository->findByUid($this->country);
179
180
        return $country->getShortNameEn();
181
    }
182
183
    /**
184
     * Returns the logo
185
     *
186
     * @return \TYPO3\CMS\Extbase\Domain\Model\FileReference $logo
187
     */
188
    public function getLogo()
189
    {
190
        return $this->logo;
191
    }
192
193
    /**
194
     * Sets the logo
195
     *
196
     * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $logo
197
     * @return void
198
     */
199
    public function setLogo(\TYPO3\CMS\Extbase\Domain\Model\FileReference $logo)
200
    {
201
        $this->logo = $logo;
202
    }
203
204
    /**
205
     * @return string
206
     */
207
    public function getLongitude()
208
    {
209
        return $this->longitude;
210
    }
211
212
    /**
213
     * @param string $longitude
214
     */
215
    public function setLongitude($longitude)
216
    {
217
        $this->longitude = $longitude;
218
    }
219
220
    /**
221
     * @return string
222
     */
223
    public function getLatitude()
224
    {
225
        return $this->latitude;
226
    }
227
228
    /**
229
     * @param string $latitude
230
     */
231
    public function setLatitude($latitude)
232
    {
233
        $this->latitude = $latitude;
234
    }
235
}
236