| @@ -1,23 +1,45 @@ | ||
| 1 | 1 | <?php |
| 2 | +/** | |
| 3 | + * ValueSetFormElement.php | |
| 4 | + * | |
| 5 | + * The ValueSetFormElement class file. | |
| 6 | + * | |
| 7 | + * PHP versions 5 | |
| 8 | + * | |
| 9 | + * @author Alexander Schneider <alexanderschneider85@gmail.com> | |
| 10 | + * @copyright 2008-2017 Alexander Schneider | |
| 11 | + * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 | |
| 12 | + * @version SVN: $id$ | |
| 13 | + * @link http://wordpress.org/extend/plugins/user-access-manager/ | |
| 14 | + */ | |
| 2 | 15 | |
| 3 | 16 | declare(strict_types=1); |
| 4 | 17 | |
| 5 | 18 | namespace UserAccessManager\Form; |
| 6 | 19 | |
| 20 | +/** | |
| 21 | + * Class ValueSetFormElement | |
| 22 | + * | |
| 23 | + * @package UserAccessManager\Form | |
| 24 | + */ | |
| 7 | 25 | abstract class ValueSetFormElement extends FormElement |
| 8 | 26 | { |
| 27 | + /** | |
| 28 | + * @var ValueSetFormElementValue[] | |
| 29 | + */ | |
| 30 | + protected $possibleValues; | |
| 9 | 31 | |
| 10 | 32 | /** |
| 33 | + * MultipleFormElement constructor. | |
| 34 | + * @param string $id | |
| 11 | 35 | * @param ValueSetFormElementValue[] $possibleValues |
| 36 | + * @param mixed|null $value | |
| 37 | + * @param string|null $label | |
| 38 | + * @param string|null $description | |
| 12 | 39 | */ |
| 13 | - public function __construct( | |
| 14 | - string $id, | |
| 15 | - protected array $possibleValues, | |
| 16 | - mixed $value = null, | |
| 17 | - ?string $label = null, | |
| 18 | - ?string $description = null | |
| 19 | - ) { | |
| 40 | + public function __construct(string $id, array $possibleValues, $value = null, $label = null, $description = null) | |
| 41 | + { | |
| 20 | 42 | parent::__construct($id, $value, $label, $description); |
| 21 | 43 | |
| 22 | 44 | $keys = array_map( |
| 23 | 45 | function (ValueSetFormElementValue $value) { |