You are here

protected function MailchimpListsSelectWidget::getEmail in Mailchimp 2.x

Parameters

$instance:

Return value

bool|null|string

1 call to MailchimpListsSelectWidget::getEmail()
MailchimpListsSelectWidget::formElement in modules/mailchimp_lists/src/Plugin/Field/FieldWidget/MailchimpListsSelectWidget.php
Returns the form for a single field widget.

File

modules/mailchimp_lists/src/Plugin/Field/FieldWidget/MailchimpListsSelectWidget.php, line 76

Class

MailchimpListsSelectWidget
Plugin implementation of the 'mailchimp_lists_select' widget.

Namespace

Drupal\mailchimp_lists\Plugin\Field\FieldWidget

Code

protected function getEmail($instance) {
  $email = NULL;
  if (!empty($instance
    ->getEntity())) {
    $email = mailchimp_lists_load_email($instance, $instance
      ->getEntity(), FALSE);
  }
  return $email;
}