src/Actions/EmailSelectAction.php
protected function getRecipient()
    {
        $recipient = $this->form->data(self::RECIPIENT_FIELD);
        $allowed = $this->requireOption('allowed-recipients');

        if (!array_key_exists($recipient, $allowed)) {
            $this->fail(I18n::translate('uniform-email-error').' '.I18n::translate('uniform-email-select-error'), self::RECIPIENT_FIELD);
        }

        return $allowed[$recipient];
    }
protected function getRecipient()
    {
        $recipient = $this->form->data(self::RECIPIENT_FIELD);
        $allowed = $this->requireOption('allowed-recipients');

        if (!array_key_exists($recipient, $allowed)) {
            $this->fail(I18n::translate('uniform-email-error').' '.I18n::translate('uniform-email-select-error'), self::RECIPIENT_FIELD);
        }

        return $allowed[$recipient];
    }
protected function getRecipient ( ) { $ recipient = $ this -> form -> data ( self :: RECIPIENT_FIELD ) ; $ allowed = $ this -> requireOption ( 'allowed-recipients' ) ; if ( ! array_key_exists ( $ recipient , $ allowed ) ) { $ this -> fail ( I18n :: translate ( 'uniform-email-error' ) . ' ' . I18n :: translate ( 'uniform-email-select-error' ) , self :: RECIPIENT_FIELD ) ; } return $ allowed [ $ recipient ] ; }
Get the chosen recipient or fail if it is invalid

@return string
Get the chosen recipient or fail if it is invalid