/** * @param $key * * @return string */ public function getSubject4Key($key) { $subjectList = $this->collectionOptions->getMailOptions()->getSubject(); // added fallback if the key not exists, in the config return isset($subjectList[$key]) ? $subjectList[$key] : $key; }