Backend\Modules\Mailmotor\EventListener\SettingsSavedListener::onSettingsSavedEvent PHP Метод

onSettingsSavedEvent() публичный Метод

On settings saved
public onSettingsSavedEvent ( SettingsSavedEvent $event )
$event Backend\Modules\Mailmotor\Event\SettingsSavedEvent
    public function onSettingsSavedEvent(SettingsSavedEvent $event)
    {
        /**
         * We must remove our container cache after this request.
         * Because this is not only saved in the module settings,
         * but the compiler pass pushes this in the container.
         * The settings cache is cleared, but the container should be cleared too,
         * to make it rebuild with the new chosen engine
         */
        $fs = new Filesystem();
        $fs->remove($this->cacheDirectory);
    }