aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/Preview/BeforePreviewFetchedEvent.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/public/Preview/BeforePreviewFetchedEvent.php')
-rw-r--r--lib/public/Preview/BeforePreviewFetchedEvent.php45
1 files changed, 41 insertions, 4 deletions
diff --git a/lib/public/Preview/BeforePreviewFetchedEvent.php b/lib/public/Preview/BeforePreviewFetchedEvent.php
index 37da63b95a1..19048e08620 100644
--- a/lib/public/Preview/BeforePreviewFetchedEvent.php
+++ b/lib/public/Preview/BeforePreviewFetchedEvent.php
@@ -27,19 +27,27 @@ declare(strict_types=1);
namespace OCP\Preview;
use OCP\Files\Node;
+use OCP\IPreview;
/**
* @since 25.0.1
*/
class BeforePreviewFetchedEvent extends \OCP\EventDispatcher\Event {
- private Node $node;
-
/**
* @since 25.0.1
*/
- public function __construct(Node $node) {
+ public function __construct(
+ private Node $node,
+ /** @deprecated 28.0.0 null deprecated **/
+ private ?int $width = null,
+ /** @deprecated 28.0.0 null deprecated **/
+ private ?int $height = null,
+ /** @deprecated 28.0.0 null deprecated **/
+ private ?bool $crop = null,
+ /** @deprecated 28.0.0 null deprecated **/
+ private ?string $mode = null,
+ ) {
parent::__construct();
- $this->node = $node;
}
/**
@@ -48,4 +56,33 @@ class BeforePreviewFetchedEvent extends \OCP\EventDispatcher\Event {
public function getNode(): Node {
return $this->node;
}
+
+ /**
+ * @since 28.0.0
+ */
+ public function getWidth(): ?int {
+ return $this->width;
+ }
+
+ /**
+ * @since 28.0.0
+ */
+ public function getHeight(): ?int {
+ return $this->height;
+ }
+
+ /**
+ * @since 28.0.0
+ */
+ public function isCrop(): ?bool {
+ return $this->crop;
+ }
+
+ /**
+ * @since 28.0.0
+ * @return null|IPreview::MODE_FILL|IPreview::MODE_COVER
+ */
+ public function getMode(): ?string {
+ return $this->mode;
+ }
}