mirror of
https://github.com/code-rhapsodie/ezdataflow-bundle.git
synced 2026-04-28 00:03:10 +02:00
b4186ed3ce
* 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>
25 lines
599 B
PHP
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();
|
|
}
|
|
}
|