Exemplo n.º 1
0
 /**
  *
  * {@inheritDoc}
  *
  * @see \Minwork\Operation\Interfaces\OperationInterface::execute()
  */
 public function execute(ObjectOperationInterface $object, array $arguments)
 {
     // If object implements ModelInterface it is possible to be reverted otherwise disable it
     if ($object instanceof ModelInterface) {
         $data = reset($arguments);
         if (is_array($data)) {
             $this->data = $object->getData(array_keys($data));
         } else {
             $this->setCanRevert(false);
         }
     }
     return parent::execute($object, $arguments);
 }
Exemplo n.º 2
0
 public function __construct(EventDispatcherInterface $eventDispatcher = null)
 {
     parent::__construct(self::OPERATION_NAME, true, true, $eventDispatcher);
 }
Exemplo n.º 3
0
 public function __construct($name, $dispatcher)
 {
     parent::__construct($name, true, true, $dispatcher);
 }