Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 7dd393a

Browse files
authoredDec 10, 2022
Merge branch 'whitecube:master' into collapsed_preview
2 parents 561b776 + 246519e commit 7dd393a

File tree

2 files changed

+1221
-1262
lines changed

2 files changed

+1221
-1262
lines changed
 

‎src/Layouts/Layout.php

+28
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,20 @@ class Layout implements LayoutInterface, JsonSerializable, ArrayAccess, Arrayabl
110110
*/
111111
protected $wasRecentlyCreated = false;
112112

113+
/**
114+
* The relation resolver callbacks for the Layout.
115+
*
116+
* @var array
117+
*/
118+
protected $relationResolvers = [];
119+
120+
/**
121+
* The loaded relationships for the Layout.
122+
*
123+
* @var array
124+
*/
125+
protected $relations = [];
126+
113127
/**
114128
* Create a new base Layout instance
115129
*
@@ -626,6 +640,20 @@ protected function relationLoaded()
626640
return false;
627641
}
628642

643+
/**
644+
* Get the dynamic relation resolver if defined or inherited, or return null.
645+
* Since it is not possible to define a relation on a layout, this method
646+
* returns null
647+
*
648+
* @param string $class
649+
* @param string $key
650+
* @return mixed
651+
*/
652+
public function relationResolver($class, $key)
653+
{
654+
return null;
655+
}
656+
629657
/**
630658
* Transform layout for serialization
631659
*

0 commit comments

Comments
 (0)