You are here

public function EmailActionBase::messageFormats in Ubercart 8.4

Options list callback for message formats.

File

uc_order/src/Plugin/RulesAction/EmailActionBase.php, line 90

Class

EmailActionBase
Provides a base class for RulesActions that send email.

Namespace

Drupal\uc_order\Plugin\RulesAction

Code

public function messageFormats() {
  $options = [];
  $formats = filter_formats($this->currentUser);
  foreach ($formats as $format) {
    $options[$format
      ->id()] = $format
      ->label();
  }
  return $options;
}