Completed
Push — development ( 32bbd2...782450 )
by Torben
05:13
created

Speaker::setName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
namespace DERHANSEN\SfEventMgt\Domain\Model;
3
4
/*
5
 * This file is part of the TYPO3 CMS project.
6
 *
7
 * It is free software; you can redistribute it and/or modify it under
8
 * the terms of the GNU General Public License, either version 2
9
 * of the License, or any later version.
10
 *
11
 * For the full copyright and license information, please read the
12
 * LICENSE.txt file that was distributed with this source code.
13
 *
14
 * The TYPO3 project - inspiring people to share!
15
 */
16
17
/**
18
 * Conference speaker model
19
 *
20
 */
21
class Speaker extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
22
{
23
24
    /**
25
     * Name
26
     *
27
     * @var string
28
     */
29
    protected $name = '';
30
31
    /**
32
     * Job title
33
     *
34
     * @var string
35
     */
36
    protected $jobTitle = '';
37
38
    /**
39
     * Description
40
     *
41
     * @var string
42
     */
43
    protected $description = '';
44
45
    /**
46
     * The image
47
     *
48
     * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference>
49
     * @lazy
50
     */
51
    protected $image = null;
52
53
    /**
54
     * Constructor
55
     */
56
    public function __construct()
57
    {
58
        $this->image = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
59
    }
60
61
    /**
62
     * Returns the speaker name
63
     *
64
     * @return string
65
     */
66
    public function getName()
67
    {
68
        return $this->name;
69
    }
70
71
    /**
72
     * Sets the speaker name
73
     *
74
     * @param string $name
75
     *
76
     * @return void
77
     */
78
    public function setName($name)
79
    {
80
        $this->name = $name;
81
    }
82
83
    /**
84
     * Returns the job title
85
     *
86
     * @return string
87
     */
88
    public function getJobTitle()
89
    {
90
        return $this->jobTitle;
91
    }
92
93
    /**
94
     * Sets the job title
95
     *
96
     * @param string $title
97
     *
98
     * @return void
99
     */
100
    public function setJobTitle($title)
101
    {
102
        $this->jobTitle = $title;
103
    }
104
105
    /**
106
     * Returns the description
107
     *
108
     * @return string $description
109
     */
110
    public function getDescription()
111
    {
112
        return $this->description;
113
    }
114
115
    /**
116
     * Sets the description
117
     *
118
     * @param string $description The description
119
     *
120
     * @return void
121
     */
122
    public function setDescription($description)
123
    {
124
        $this->description = $description;
125
    }
126
127
    /**
128
     * Adds an image
129
     *
130
     * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $image Image
131
     *
132
     * @return void
133
     */
134
    public function addImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $image)
135
    {
136
        $this->image->attach($image);
137
    }
138
139
    /**
140
     * Removes an image
141
     *
142
     * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $imageToRemove Image
143
     *
144
     * @return void
145
     */
146
    public function removeImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $imageToRemove)
147
    {
148
        $this->image->detach($imageToRemove);
149
    }
150
151
    /**
152
     * Returns the image
153
     *
154
     * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage $image
155
     */
156
    public function getImage()
157
    {
158
        return $this->image;
159
    }
160
161
    /**
162
     * Sets the image
163
     *
164
     * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $image Image
165
     *
166
     * @return void
167
     */
168
    public function setImage(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $image)
169
    {
170
        $this->image = $image;
171
    }
172
}
173