Files
piratepoet/mailpoet/lib/Automation/Engine/Workflows/AbstractSubject.php
John Oleksowicz 69b523171f Initial stab at a welcome email action
[MAILPOET-4191]
2022-04-18 09:10:23 +02:00

16 lines
412 B
PHP

<?php declare(strict_types = 1);
namespace MailPoet\Automation\Engine\Workflows;
use MailPoet\NotFoundException;
abstract class AbstractSubject implements Subject {
public function getField(string $key): Field {
if (!isset($this->getFields()[$key])) {
throw NotFoundException::create()->withMessage(__("No field found with key '%s'.", $key));
}
return $this->getFields()[$key];
}
}