2020-03-22 20:39:55 +00:00
|
|
|
<?php
|
2020-09-21 12:25:50 +00:00
|
|
|
/*
|
2024-02-02 18:27:50 +00:00
|
|
|
* Copyright (c) 2020-2024. The Nextcloud Bookmarks contributors.
|
2020-09-21 12:25:50 +00:00
|
|
|
*
|
|
|
|
* This file is licensed under the Affero General Public License version 3 or later. See the COPYING file.
|
|
|
|
*/
|
2020-08-02 14:05:52 +00:00
|
|
|
|
2020-03-22 20:39:55 +00:00
|
|
|
namespace OCA\Bookmarks\Events;
|
|
|
|
|
|
|
|
class MoveEvent extends ChangeEvent {
|
|
|
|
private $oldParent;
|
|
|
|
private $newParent;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* MoveEvent constructor.
|
|
|
|
*
|
|
|
|
* @param string $type
|
|
|
|
* @param int $id
|
|
|
|
* @param int|null $oldParent
|
|
|
|
* @param int|null $newParent
|
|
|
|
*/
|
2024-02-02 19:04:13 +00:00
|
|
|
public function __construct(string $type, int $id, ?int $oldParent = null, ?int $newParent = null) {
|
2020-03-22 20:39:55 +00:00
|
|
|
parent::__construct($type, $id);
|
|
|
|
$this->oldParent = $oldParent;
|
|
|
|
$this->newParent = $newParent;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return int|null
|
|
|
|
*/
|
|
|
|
public function getOldParent(): ?int {
|
|
|
|
return $this->oldParent;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return int|null
|
|
|
|
*/
|
|
|
|
public function getNewParent(): ?int {
|
|
|
|
return $this->newParent;
|
|
|
|
}
|
|
|
|
}
|