We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 123b909 + f0d1cfa commit a1205d0Copy full SHA for a1205d0
src/Block/AbstractBlock.php
@@ -80,7 +80,7 @@ protected function replaceRelativeUrl(string $context): string
80
/**
81
* Fetch document view
82
*
83
- * @return string
+ * @return string|bool
84
*/
85
- abstract public function fetchDocumentView(): string;
+ abstract public function fetchDocumentView(): string | bool;
86
}
src/Block/Dom/Boolean.php
@@ -0,0 +1,13 @@
1
+<?php declare(strict_types=1);
2
+
3
+namespace Elgentos\PrismicIO\Block\Dom;
4
5
+use Elgentos\PrismicIO\Block\AbstractBlock;
6
7
+class Boolean extends AbstractBlock
8
+{
9
+ public function fetchDocumentView(): bool
10
+ {
11
+ return (bool) $this->getContext();
12
+ }
13
+}
0 commit comments