Вынес еще классы

This commit is contained in:
Фёдор Подлеснов 2018-02-01 14:43:17 +03:00
parent ca5cf04146
commit 7b3190f96e
6 changed files with 126 additions and 128 deletions

14
src/Form/SelectMany.php Normal file
View file

@ -0,0 +1,14 @@
<?php
class Form_SelectMany extends Form_Select
{
function setValue($value)
{
// Установить selected у options
if (!is_array($value)) { $value = array($value); }
$this->value = $value;
foreach ($this->options as &$option) {
$option['selected'] = (in_array($option['value'], $value));
}
}
}