src/UthandoMail/Form/Element/MailTransportList.php
public function init()
    {
        /* @var $options MailOptions */
        $options = $this->getServiceLocator()
            ->getServiceLocator()
            ->get(MailOptions::class);

        $emailAddresses = $options->getAddressList();

        $addressList = [];

        foreach ($emailAddresses as $transport => $address) {

            $addressList[] = [
                'label' => $address['name'] . ' <' . $address['address'] . '>',
                'value' => $transport,
            ];
        }

        $this->setValueOptions($addressList);
    }
public function init()
    {
        /* @var $options MailOptions */
        $options = $this->getServiceLocator()
            ->getServiceLocator()
            ->get(MailOptions::class);

        $emailAddresses = $options->getAddressList();

        $addressList = [];

        foreach ($emailAddresses as $transport => $address) {

            $addressList[] = [
                'label' => $address['name'] . ' <' . $address['address'] . '>',
                'value' => $transport,
            ];
        }

        $this->setValueOptions($addressList);
    }
public function init ( ) { /* @var $options MailOptions */ $ options = $ this -> getServiceLocator ( ) -> getServiceLocator ( ) -> get ( MailOptions :: class ) ; $ emailAddresses = $ options -> getAddressList ( ) ; $ addressList = [ ] ; foreach ( $ emailAddresses as $ transport => $ address ) { $ addressList [ ] = [ 'label' => $ address [ 'name' ] . ' <' . $ address [ 'address' ] . '>' , 'value' => $ transport , ] ; } $ this -> setValueOptions ( $ addressList ) ; }
Set up value options
Set up value options