[FEATURE] Introduce conditional variants for form elements
[Packages/TYPO3.CMS.git] / typo3 / sysext / form / Classes / Domain / Model / Renderable / VariableRenderableInterface.php
1 <?php
2 declare(strict_types = 1);
3 namespace TYPO3\CMS\Form\Domain\Model\Renderable;
4
5 /*
6 * This file is part of the TYPO3 CMS project.
7 *
8 * It originated from the Neos.Form package (www.neos.io)
9 *
10 * It is free software; you can redistribute it and/or modify it under
11 * the terms of the GNU General Public License, either version 2
12 * of the License, or any later version.
13 *
14 * For the full copyright and license information, please read the
15 * LICENSE.txt file that was distributed with this source code.
16 *
17 * The TYPO3 project - inspiring people to share!
18 */
19
20 /**
21 * Scope: frontend
22 * **This class is NOT meant to be sub classed by developers.**
23 */
24 interface VariableRenderableInterface
25 {
26
27 /**
28 * Set multiple properties of this object at once.
29 * Every property which has a corresponding set* method can be set using
30 * the passed $options array.
31 *
32 * @param array $options
33 * @param bool $reset
34 * @internal
35 */
36 public function setOptions(array $options, bool $reset = false);
37
38 /**
39 * Get all rendering variants
40 *
41 * @return RenderableVariantInterface[]
42 * @api
43 */
44 public function getVariants(): array;
45
46 /**
47 * Adds the specified variant to this form element
48 *
49 * @param RenderableVariantInterface $variant
50 * @api
51 */
52 public function addVariant(RenderableVariantInterface $variant);
53 }