1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* Entity ZoneStorage. |
5
|
|
|
* |
6
|
|
|
* PHP Version 7 |
7
|
|
|
* |
8
|
|
|
* @author Quétier Laurent <[email protected]> |
9
|
|
|
* @copyright 2014 Dev-Int GLSR |
10
|
|
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License |
11
|
|
|
* |
12
|
|
|
* @version GIT: <git_id> |
13
|
|
|
* |
14
|
|
|
* @link https://github.com/Dev-Int/glsr |
15
|
|
|
*/ |
16
|
|
|
namespace App\Entity\Settings\Diverse; |
17
|
|
|
|
18
|
|
|
use Doctrine\ORM\Mapping as ORM; |
19
|
|
|
use Gedmo\Mapping\Annotation as Gedmo; |
20
|
|
|
|
21
|
|
|
/** |
22
|
|
|
* ZoneStorage entity. |
23
|
|
|
* |
24
|
|
|
* @category Entity |
25
|
|
|
* |
26
|
|
|
* @ORM\Table(name="gs_zonestorage") |
27
|
|
|
* @ORM\Entity(repositoryClass="App\Repository\Settings\Diverse\ZoneStorageRepository") |
28
|
|
|
*/ |
29
|
|
|
class ZoneStorage |
30
|
|
|
{ |
31
|
|
|
/** |
32
|
|
|
* @var int $zsId Id of the storage area |
33
|
|
|
* |
34
|
|
|
* @ORM\Column(name="id", type="integer") |
35
|
|
|
* @ORM\Id |
36
|
|
|
* @ORM\GeneratedValue(strategy="AUTO") |
37
|
|
|
*/ |
38
|
|
|
private $zsId; |
39
|
|
|
|
40
|
|
|
/** |
41
|
|
|
* @var string $name Name of the storage area |
42
|
|
|
* |
43
|
|
|
* @ORM\Column(name="name", type="string", length=255) |
44
|
|
|
*/ |
45
|
|
|
private $name; |
46
|
|
|
|
47
|
|
|
/** |
48
|
|
|
* @var string $slug Slug name |
49
|
|
|
* @Gedmo\Slug(fields={"name"}) |
50
|
|
|
* @ORM\Column(length=128, unique=true) |
51
|
|
|
*/ |
52
|
|
|
private $slug; |
53
|
|
|
|
54
|
|
|
/** |
55
|
|
|
* Get id. |
56
|
|
|
* |
57
|
|
|
* @return int |
58
|
|
|
*/ |
59
|
|
|
public function getId() |
60
|
|
|
{ |
61
|
|
|
return $this->zsId; |
62
|
|
|
} |
63
|
|
|
|
64
|
|
|
/** |
65
|
|
|
* Set name. |
66
|
|
|
* |
67
|
|
|
* @param string $name Name of the storage area |
68
|
|
|
* |
69
|
|
|
* @return Settings\Diverse\ZoneStorage |
70
|
|
|
*/ |
71
|
|
|
public function setName($name) |
72
|
|
|
{ |
73
|
|
|
$this->name = $name; |
74
|
|
|
|
75
|
|
|
return $this; |
76
|
|
|
} |
77
|
|
|
|
78
|
|
|
/** |
79
|
|
|
* Get name. |
80
|
|
|
* |
81
|
|
|
* @return string |
82
|
|
|
*/ |
83
|
|
|
public function getName() |
84
|
|
|
{ |
85
|
|
|
return $this->name; |
86
|
|
|
} |
87
|
|
|
|
88
|
|
|
/** |
89
|
|
|
* Get slug |
90
|
|
|
* |
91
|
|
|
* @return string |
92
|
|
|
*/ |
93
|
|
|
public function getSlug() |
94
|
|
|
{ |
95
|
|
|
return $this->slug; |
96
|
|
|
} |
97
|
|
|
|
98
|
|
|
/** |
99
|
|
|
* This method allows to do "echo $zoneStorage". |
100
|
|
|
* <p> So, to "show" $unizoneStoraget, |
101
|
|
|
* PHP will actually show the return of this method. <br /> |
102
|
|
|
* Here, the abbreviation, so "echo $zoneStorage" |
103
|
|
|
* is equivalent to "echo $zoneStorage->getName()" </ p>. |
104
|
|
|
* |
105
|
|
|
* @return string name |
106
|
|
|
*/ |
107
|
|
|
public function __toString() |
108
|
|
|
{ |
109
|
|
|
return $this->name; |
110
|
|
|
} |
111
|
|
|
} |
112
|
|
|
|