diff options
Diffstat (limited to 'vendor/symfony/form/Symfony/Component/Form/Extension/Core/View/ChoiceView.php')
-rw-r--r-- | vendor/symfony/form/Symfony/Component/Form/Extension/Core/View/ChoiceView.php | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/vendor/symfony/form/Symfony/Component/Form/Extension/Core/View/ChoiceView.php b/vendor/symfony/form/Symfony/Component/Form/Extension/Core/View/ChoiceView.php new file mode 100644 index 00000000..97cdd214 --- /dev/null +++ b/vendor/symfony/form/Symfony/Component/Form/Extension/Core/View/ChoiceView.php | |||
@@ -0,0 +1,55 @@ | |||
1 | <?php | ||
2 | |||
3 | /* | ||
4 | * This file is part of the Symfony package. | ||
5 | * | ||
6 | * (c) Fabien Potencier <fabien@symfony.com> | ||
7 | * | ||
8 | * For the full copyright and license information, please view the LICENSE | ||
9 | * file that was distributed with this source code. | ||
10 | */ | ||
11 | |||
12 | namespace Symfony\Component\Form\Extension\Core\View; | ||
13 | |||
14 | /** | ||
15 | * Represents a choice in templates. | ||
16 | * | ||
17 | * @author Bernhard Schussek <bschussek@gmail.com> | ||
18 | */ | ||
19 | class ChoiceView | ||
20 | { | ||
21 | /** | ||
22 | * The original choice value. | ||
23 | * | ||
24 | * @var mixed | ||
25 | */ | ||
26 | public $data; | ||
27 | |||
28 | /** | ||
29 | * The view representation of the choice. | ||
30 | * | ||
31 | * @var string | ||
32 | */ | ||
33 | public $value; | ||
34 | |||
35 | /** | ||
36 | * The label displayed to humans. | ||
37 | * | ||
38 | * @var string | ||
39 | */ | ||
40 | public $label; | ||
41 | |||
42 | /** | ||
43 | * Creates a new ChoiceView. | ||
44 | * | ||
45 | * @param mixed $data The original choice. | ||
46 | * @param string $value The view representation of the choice. | ||
47 | * @param string $label The label displayed to humans. | ||
48 | */ | ||
49 | public function __construct($data, $value, $label) | ||
50 | { | ||
51 | $this->data = $data; | ||
52 | $this->value = $value; | ||
53 | $this->label = $label; | ||
54 | } | ||
55 | } | ||