You are here

protected function ContactEmails::getEmailField in Contact Emails 8

Get contact form fields by type.

Parameters

array $available_fields: The already added available fields.

object $field: The field.

Return value

array The new array of available fields.

1 call to ContactEmails::getEmailField()
ContactEmails::getContactFormFields in src/ContactEmails.php
Get contact form fields by type.

File

src/ContactEmails.php, line 159

Class

ContactEmails
Class ContactEmails.

Namespace

Drupal\contact_emails

Code

protected function getEmailField(array $available_fields, $field) {
  $available_fields[$field
    ->getName()] = $field
    ->getLabel();
  return $available_fields;
}