You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* @deprecated Deprecated since Symfony 2.7, to be removed in Symfony 3.0.
22
-
* Use {@link BaseChoiceView} instead.
20
+
* Use {@link \Symfony\Component\Form\ChoiceList\View\ChoiceView} instead.
23
21
*/
24
-
class ChoiceViewextends BaseChoiceView
22
+
class ChoiceView
25
23
{
24
+
/**
25
+
* The original choice value.
26
+
*
27
+
* @var mixed
28
+
*/
29
+
public$data;
30
+
31
+
/**
32
+
* The view representation of the choice.
33
+
*
34
+
* @var string
35
+
*/
36
+
public$value;
37
+
38
+
/**
39
+
* The label displayed to humans.
40
+
*
41
+
* @var string
42
+
*/
43
+
public$label;
8000
44
+
26
45
/**
27
46
* Creates a new ChoiceView.
28
47
*
@@ -32,7 +51,9 @@ class ChoiceView extends BaseChoiceView
32
51
*/
33
52
publicfunction__construct($data, $value, $label)
34
53
{
35
-
parent::__construct($label, $value, $data);
54
+
$this->data = $data;
55
+
$this->value = $value;
56
+
$this->label = $label;
36
57
37
58
trigger_error('The '.__CLASS__.' class is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Component\Form\ChoiceList\View\ChoiceView instead.', E_USER_DEPRECATED);
0 commit comments