You are here

private function MailEditTemplateForm::getModuleName in Mail Editor 8

Extract the module's name from an email ID.

Parameters

string $id: A string in the format 'MODULENAME.CONFIGNAME.TEMPLATENAME'.

Return value

string The name of the module which specifies the email.

2 calls to MailEditTemplateForm::getModuleName()
MailEditTemplateForm::buildForm in src/Form/MailEditTemplateForm.php
Form constructor.
MailEditTemplateForm::getTemplate in src/Form/MailEditTemplateForm.php
Load an email template from a combination string.

File

src/Form/MailEditTemplateForm.php, line 138

Class

MailEditTemplateForm
Edit an email template.

Namespace

Drupal\mail_edit\Form

Code

private function getModuleName($id) {
  $parts = explode('.', $id);
  return $parts[0];
}