Вынес еще классы
This commit is contained in:
parent
ca5cf04146
commit
7b3190f96e
6 changed files with 126 additions and 128 deletions
14
src/Form/SelectMany.php
Normal file
14
src/Form/SelectMany.php
Normal 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));
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue