File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed
Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -54,11 +54,11 @@ public function combineCollection(ImageSourceProxyCollection|ImageSourceProxy|nu
5454
5555 /**
5656 * @param ImageSourceProxyCollection|ImageSourceProxy|null ...$items
57- * @return @return ImageSourceInterface[]
57+ * @return ImageSourceInterface[]
5858 */
5959 public function combineAndUnwrapCollection (ImageSourceProxyCollection |ImageSourceProxy |null ...$ items ): array
6060 {
61- return $ this ->unwrapProxyCollection ( $ this ->combineCollection (...$ items ));
61+ return $ this ->unwrapProxyCollection ($ this ->combineCollection (...$ items ));
6262 }
6363
6464 public function allowsCallOfMethod ($ methodName )
Original file line number Diff line number Diff line change 44
55namespace Sitegeist \Kaleidoscope \ValueObjects ;
66
7+ use Doctrine \Persistence \Proxy ;
78use Neos \Flow \Annotations as Flow ;
89use Neos \Media \Domain \Model \AssetInterface ;
910use Neos \Media \Domain \Model \Image ;
@@ -42,9 +43,16 @@ public static function fromArray(array $data): self
4243
4344 public static function fromAsset (Image |ImageVariant $ asset ): self
4445 {
46+ if ($ asset instanceof Proxy) {
47+ /** @var class-string $className */
48+ $ className = get_parent_class ($ asset );
49+ } else {
50+ /** @var class-string $className */
51+ $ className = get_class ($ asset );
52+ }
4553 return new self (
4654 $ asset ->getIdentifier (),
47- get_class ( $ asset ),
55+ $ className
4856 );
4957 }
5058
You can’t perform that action at this time.
0 commit comments