You are here

protected function EntityLegalDocumentForm::getAcceptanceDeliveryMethodOptions in Entity Legal 3.0.x

Same name and namespace in other branches
  1. 8.2 src/Form/EntityLegalDocumentForm.php \Drupal\entity_legal\Form\EntityLegalDocumentForm::getAcceptanceDeliveryMethodOptions()
  2. 4.0.x src/Form/EntityLegalDocumentForm.php \Drupal\entity_legal\Form\EntityLegalDocumentForm::getAcceptanceDeliveryMethodOptions()

Methods for presenting the legal document to end users.

Parameters

string $type: The type of user, 'new_users' or 'existing_users'.

Return value

array Methods available keyed by method name and title.

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

File

src/Form/EntityLegalDocumentForm.php, line 499

Class

EntityLegalDocumentForm
Base form for contact form edit forms.

Namespace

Drupal\entity_legal\Form

Code

protected function getAcceptanceDeliveryMethodOptions($type) {
  $methods = [];
  foreach ($this->pluginManager
    ->getDefinitions() as $plugin) {
    if ($plugin['type'] == $type) {
      $methods[$plugin['id']] = $plugin['label'];
    }
  }
  return $methods;
}