You are here

public function InviteTypeForm::getDefaultSendMethods in Invite 8

Helper function to load the default send method for the invite type.

1 call to InviteTypeForm::getDefaultSendMethods()
InviteTypeForm::form in src/Form/InviteTypeForm.php
Gets the actual form array to be built.

File

src/Form/InviteTypeForm.php, line 62

Class

InviteTypeForm
Form controller for Invite type edit forms.

Namespace

Drupal\invite\Form

Code

public function getDefaultSendMethods($invite_type) {
  $defaults = [];
  foreach (explode('||', \Drupal::config('invite.invite_sender.' . $invite_type
    ->getType())
    ->get('sending_methods')) as $sending_method) {
    if ($sending_method != '0') {
      $defaults[$sending_method] = $sending_method;
    }
  }
  return $defaults;
}