1
|
|
|
<?php |
2
|
|
|
namespace TildBJ\Seeder\Domain\Model\Column; |
3
|
|
|
|
4
|
|
|
/*************************************************************** |
5
|
|
|
* |
6
|
|
|
* Copyright notice |
7
|
|
|
* |
8
|
|
|
* (c) 2016 Dennis Römmich <[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
|
|
|
use TildBJ\Seeder\Domain\Model\Column; |
29
|
|
|
|
30
|
|
|
/** |
31
|
|
|
* Class Group |
32
|
|
|
* |
33
|
|
|
* @package TildBJ\Seeder\Domain\Model\Group |
34
|
|
|
*/ |
35
|
|
|
class Group extends Column implements GroupInterface |
36
|
|
|
{ |
37
|
|
|
/** |
38
|
|
|
* @return string |
39
|
|
|
*/ |
40
|
|
|
protected $foreignTable; |
41
|
|
|
|
42
|
|
|
/** |
43
|
|
|
* @return string |
44
|
|
|
*/ |
45
|
|
|
protected $internalType; |
46
|
|
|
|
47
|
|
|
/** |
48
|
|
|
* @return int |
49
|
|
|
*/ |
50
|
|
|
protected $minItems; |
51
|
|
|
|
52
|
|
|
/** |
53
|
|
|
* @return int |
54
|
|
|
*/ |
55
|
|
|
protected $maxItems; |
56
|
|
|
|
57
|
|
|
/** |
58
|
|
|
* @return int |
59
|
|
|
*/ |
60
|
|
|
protected $size; |
61
|
|
|
|
62
|
|
|
/** |
63
|
|
|
* Input constructor. |
64
|
|
|
* |
65
|
|
|
* @param string $columnName |
66
|
|
|
* @param $configuration |
67
|
|
|
*/ |
68
|
|
|
public function __construct($columnName, $configuration) |
69
|
|
|
{ |
70
|
|
|
parent::__construct($columnName); |
71
|
|
|
$this->foreignTable = $configuration['foreign_table']; |
72
|
|
|
$this->internalType = $configuration['internal_type']; |
73
|
|
|
$this->minItems = $configuration['minitems']; |
74
|
|
|
$this->maxItems = $configuration['maxitems']; |
75
|
|
|
$this->size = $configuration['size']; |
76
|
|
|
} |
77
|
|
|
|
78
|
|
|
/** |
79
|
|
|
* @return string |
80
|
|
|
*/ |
81
|
|
|
public function getForeignTable() |
82
|
|
|
{ |
83
|
|
|
return $this->foreignTable; |
84
|
|
|
} |
85
|
|
|
|
86
|
|
|
/** |
87
|
|
|
* @return string |
88
|
|
|
*/ |
89
|
|
|
public function getInternalType() |
90
|
|
|
{ |
91
|
|
|
return $this->internalType; |
92
|
|
|
} |
93
|
|
|
|
94
|
|
|
/** |
95
|
|
|
* @return int |
96
|
|
|
*/ |
97
|
|
|
public function getMinItems() |
98
|
|
|
{ |
99
|
|
|
return $this->minItems; |
100
|
|
|
} |
101
|
|
|
|
102
|
|
|
/** |
103
|
|
|
* @return int |
104
|
|
|
*/ |
105
|
|
|
public function getMaxItems() |
106
|
|
|
{ |
107
|
|
|
return $this->maxItems; |
108
|
|
|
} |
109
|
|
|
|
110
|
|
|
/** |
111
|
|
|
* @return int |
112
|
|
|
*/ |
113
|
|
|
public function getSize() |
114
|
|
|
{ |
115
|
|
|
return $this->size; |
116
|
|
|
} |
117
|
|
|
} |
118
|
|
|
|