1 | <?php |
||
16 | abstract class AbstractSetType extends Type |
||
17 | { |
||
18 | /** |
||
19 | * @var string $name Name of this type |
||
20 | */ |
||
21 | protected $name = ''; |
||
22 | |||
23 | /** |
||
24 | * @var array $choices Map of available SET type, key and label |
||
25 | * @static |
||
26 | */ |
||
27 | protected static $choices = []; |
||
28 | |||
29 | /** |
||
30 | * {@inheritdoc} |
||
31 | */ |
||
32 | 6 | public function convertToDatabaseValue($value, AbstractPlatform $platform) |
|
50 | |||
51 | /** |
||
52 | * @param string|null $value |
||
53 | * @param AbstractPlatform $platform |
||
54 | * @return array |
||
55 | */ |
||
56 | 4 | public function convertToPHPValue($value, AbstractPlatform $platform) |
|
67 | |||
68 | /** |
||
69 | * @param array $fieldDeclaration |
||
70 | * @param AbstractPlatform $platform |
||
71 | * @return string |
||
72 | */ |
||
73 | public function getSqlDeclaration(array $fieldDeclaration, AbstractPlatform $platform) |
||
88 | |||
89 | /** |
||
90 | * {@inheritdoc} |
||
91 | */ |
||
92 | 1 | public function requiresSQLCommentHint(AbstractPlatform $platform) |
|
96 | |||
97 | /** |
||
98 | * {@inheritdoc} |
||
99 | */ |
||
100 | 1 | public function getName() |
|
104 | |||
105 | /** |
||
106 | * Get choices Label for the Set form field type |
||
107 | * |
||
108 | * @return array Values for the SET field |
||
109 | */ |
||
110 | 11 | public static function getChoices() |
|
114 | |||
115 | /** |
||
116 | * Get values for the SET field |
||
117 | * |
||
118 | * @return array Values for the SET field |
||
119 | */ |
||
120 | 10 | public static function getValues() |
|
124 | } |
||
125 |