| @@ 1041-1047 (lines=7) @@ | ||
| 1038 | return $result->getArray($key); |
|
| 1039 | } |
|
| 1040 | $list = $result->getObjects(get_called_class(), $key); |
|
| 1041 | if (!empty($options['forSelect'])) { |
|
| 1042 | $return = []; |
|
| 1043 | foreach ($list as $key => $item) { |
|
| 1044 | $return[$key] = $item->name(); |
|
| 1045 | } |
|
| 1046 | return $return; |
|
| 1047 | } |
|
| 1048 | return $list; |
|
| 1049 | } |
|
| 1050 | ||
| @@ 1177-1183 (lines=7) @@ | ||
| 1174 | return 0; |
|
| 1175 | }); |
|
| 1176 | } |
|
| 1177 | if (!empty($options['forSelect'])) { |
|
| 1178 | $return = []; |
|
| 1179 | foreach ($items as $key => $item) { |
|
| 1180 | $return[$key] = $item->name(); |
|
| 1181 | } |
|
| 1182 | return $return; |
|
| 1183 | } |
|
| 1184 | return $items; |
|
| 1185 | } |
|
| 1186 | return []; |
|