function DevelMailLog::create

Same name in other branches
  1. 4.x src/Plugin/Mail/DevelMailLog.php \Drupal\devel\Plugin\Mail\DevelMailLog::create()

Overrides ContainerFactoryPluginInterface::create

File

src/Plugin/Mail/DevelMailLog.php, line 68

Class

DevelMailLog
Defines a mail backend that saves emails as temporary files.

Namespace

Drupal\devel\Plugin\Mail

Code

public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) : static {
    $instance = new static();
    $instance->config = $container->get('config.factory')
        ->get('devel.settings');
    $instance->fileSystem = $container->get('file_system');
    return $instance;
}