|
@@ -137,6 +137,10 @@ class ClientChoiceLoader implements ChoiceLoaderInterface
|
|
|
|
|
|
/**
|
|
/**
|
|
* Get first n choices
|
|
* Get first n choices
|
|
|
|
+ *
|
|
|
|
+ * @param string $filter
|
|
|
|
+ *
|
|
|
|
+ * @return array
|
|
*/
|
|
*/
|
|
public function getChoicesList($filter)
|
|
public function getChoicesList($filter)
|
|
{
|
|
{
|
|
@@ -153,14 +157,7 @@ class ClientChoiceLoader implements ChoiceLoaderInterface
|
|
$filter_len = mb_strlen($filter);
|
|
$filter_len = mb_strlen($filter);
|
|
|
|
|
|
foreach ($choices as $label => $id) {
|
|
foreach ($choices as $label => $id) {
|
|
- if ($filter_len > 0) {
|
|
|
|
- if (mb_substr(mb_strtolower($label), 0, $filter_len) !== $filter) {
|
|
|
|
- continue;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
$result[$label] = $id;
|
|
$result[$label] = $id;
|
|
-
|
|
|
|
if (++$cnt >= $limit) {
|
|
if (++$cnt >= $limit) {
|
|
break;
|
|
break;
|
|
}
|
|
}
|