Files
ezdataflow-bundle/src/Writer/RepositoryWriter.php
T
jbcr b4186ed3ce WIP: Add compatibilty to eZ Platform 3 (#20)
* update require to platform 3

* update admin to admin ui 2.0beta3

* some eZ Platform 3 change (#32)

* bump eZ required version

* enable autowire and autoconfigure on controller

* use contracts dependency for translation interface instead of Component

* change requirements

* add change log

Co-authored-by: Jean-Baptiste Nahan <814683+macintoshplus@users.noreply.github.com>
2021-06-25 14:52:13 +02:00

25 lines
599 B
PHP

<?php
declare(strict_types=1);
namespace CodeRhapsodie\EzDataflowBundle\Writer;
use CodeRhapsodie\DataflowBundle\DataflowType\Writer\WriterInterface;
use CodeRhapsodie\EzDataflowBundle\UserSwitcher\UserSwitcherAwareInterface;
use CodeRhapsodie\EzDataflowBundle\UserSwitcher\UserSwitcherAwareTrait;
abstract class RepositoryWriter implements WriterInterface, UserSwitcherAwareInterface
{
use UserSwitcherAwareTrait;
public function prepare()
{
$this->userSwitcher->switchToAdmin();
}
public function finish()
{
$this->userSwitcher->switchBack();
}
}