You are here

private function MailEditTemplateForm::getConfigName in Mail Editor 8

Extract the email's config object name from an email ID.

Parameters

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

Return value

string The name of the config object, which will be the first two portions of the ID when split on the period character.

3 calls to MailEditTemplateForm::getConfigName()
MailEditTemplateForm::getConfig in src/Form/MailEditTemplateForm.php
Extract the email's config object name from an email ID.
MailEditTemplateForm::getTemplate in src/Form/MailEditTemplateForm.php
Load an email template from a combination string.
MailEditTemplateForm::submitForm in src/Form/MailEditTemplateForm.php
Form submission handler.

File

src/Form/MailEditTemplateForm.php, line 153

Class

MailEditTemplateForm
Edit an email template.

Namespace

Drupal\mail_edit\Form

Code

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