Form/ChoiceList/LdapObjectChoiceList.php
public function getIndicesForChoices(array $choices)
    {
        if (empty(array_filter($choices))) {
            return [];
        }

        $indices = [];
        foreach ($choices as $k => $choice) {
            foreach ($this->ldapObjects as $i => $ldapObject) {
                if ($ldapObject->has($this->id, $choice->get($this->id))) {
                    $indices[$k] = $i;
                    break;
                }
            }
        }

        return $indices;
    }
public function getIndicesForChoices(array $choices)
    {
        if (empty(array_filter($choices))) {
            return [];
        }

        $indices = [];
        foreach ($choices as $k => $choice) {
            foreach ($this->ldapObjects as $i => $ldapObject) {
                if ($ldapObject->has($this->id, $choice->get($this->id))) {
                    $indices[$k] = $i;
                    break;
                }
            }
        }

        return $indices;
    }
{@inheritdoc}