/** * * {@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); }
public function __construct(EventDispatcherInterface $eventDispatcher = null) { parent::__construct(self::OPERATION_NAME, true, true, $eventDispatcher); }
public function __construct($name, $dispatcher) { parent::__construct($name, true, true, $dispatcher); }