Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Retrieve value of a field of an email template
- *
- * @param string $templateId Name of an email template
- * @param string $fieldName Name of a field value of which to return
- * @return string
- * @throws UnexpectedValueException
- */
- protected function _getInfo($templateId, $fieldName)
- {
- $data = $this->_dataStorage->get();
- if (!isset($data[$templateId])) {
- throw new UnexpectedValueException("Email template '{$templateId}' is not defined.");
- }
- if (!isset($data[$templateId][$fieldName])) {
- throw new UnexpectedValueException(
- "Field '{$fieldName}' is not defined for email template '{$templateId}'."
- );
- }
- return $data[$templateId][$fieldName];
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement