In Magento, how does a Pool differ from a Collection?

Adding a Modifier for the adminhtml Product page is done by adding it’s class to the list of Modifiers.

“` // di.xml

<virtualType name=”%YourNamespaceYourModuleDataProviderModifierPool%” type=”MagentoUiDataProviderModifierPool”> “`

Why are these Modifies using a Pool, instead of a Collection? What is the fundamental difference between a Pool and a Collection here? It seems that the PoolInterface is used in three places, but I don’t see anything that distinguishes these places as being unable to use a Collection instead.

“` $ rg -u “interface PoolInterface” framework/View/Element/UiComponent/PoolInterface.php 13:interface PoolInterface

framework/View/Element/Message/Renderer/PoolInterface.php 12:interface PoolInterface

module-ui/DataProvider/Modifier/PoolInterface.php 12:interface PoolInterface “`

submitted by /u/dotancohen
[link] [comments]