Form/ChoiceLoader/LdapObjectChoiceLoader.php
public function loadChoiceList($value = null)
    {
        if ($this->choiceList) {
            return $this->choiceList;
        }
        $ldapObjects = $this->getLdapObjectsByQuery();

        $choices = [];
        /** @var LdapObject $object */
        foreach ($ldapObjects as $object) {
            $choices[$object->get($this->labelAttribute)] = $object;
        }
        $this->choiceList = $this->factory->createListFromChoices($choices, $this->id);

        return $this->choiceList;
    }
public function loadChoiceList($value = null)
    {
        if ($this->choiceList) {
            return $this->choiceList;
        }
        $ldapObjects = $this->getLdapObjectsByQuery();

        $choices = [];
        /** @var LdapObject $object */
        foreach ($ldapObjects as $object) {
            $choices[$object->get($this->labelAttribute)] = $object;
        }
        $this->choiceList = $this->factory->createListFromChoices($choices, $this->id);

        return $this->choiceList;
    }
{@inheritdoc}