Commit fa9b2e3f authored by Виктор Волков's avatar Виктор Волков
Browse files

fix: fix abstract commands

parent 1da6c786
1 merge request!57Develop
Pipeline #4278 passed with stages
in 1 minute and 43 seconds
......@@ -11,8 +11,6 @@ use ServiceCore\Infrastructure\Service\GuidGenerator;
*/
abstract class AbstractEntityCreateCommand implements CommandInterface
{
use EventCommandTrait;
/**
* @var string
*/
......
......@@ -11,8 +11,6 @@ use ServiceCore\Infrastructure\Service\GuidGenerator;
*/
abstract class AbstractEntityDeleteCommand implements CommandInterface
{
use EventCommandTrait;
/**
* @var string
*/
......
......@@ -11,8 +11,6 @@ use ServiceCore\Infrastructure\Service\GuidGenerator;
*/
abstract class AbstractEntityUpdateCommand implements CommandInterface
{
use EventCommandTrait;
/**
* @var string
*/
......
<?php
namespace ServiceCore\Application\Command;
/**
* Trait EventCommandTrait
*
* @package ServiceCore\Application\Command
*/
trait EventCommandTrait
{
protected $eventsStopped = false;
public function stopEventsPropagation(): void
{
$this->eventsStopped = true;
}
public function resumeEventsPropagation(): void
{
$this->eventsStopped = false;
}
public function eventsStopped(): bool
{
return $this->eventsStopped;
}
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment