

If you will dig deeper you’ll find collectionProcessor iterates through implementations of CollectionProcessorInterface whose can be provided in the constructor.

The easiest way to add join processor could be around plugin or class/method rewrite, but methods used inside foreach are private and it is too complicated to copy them to your rewrite/plugin class. We also cannot add it before method call because the search result is initiated inside the method.Įffectively, we should add extension join processor somewhere between $this->searchResultFactory->create() and $searchResult->getItems(). Authentication: Admin Default Format: XML Parameters: No Parameters. In my current project, I have a similar situation, where my extension attribute is an array of objects. Magento ExtensionInterfaces is required to have all the methods that are declared in the extensionattributes.xml. is a fresh service directed to help developers to select extensions for Magento in a most efficient way. Currently in the docs it mentions that we can use length attribute to define the text column size however Magento 2 won't allow it failing to create the column. Our module expands Cart object with Reward Points using attribute. Enjoy latest documentation for Magento 2 in Doxygen format.

Magento devdocs extension attribute full#
The result is iterated inside the method which means that data is loaded, so we cannot add extension join processor after method call / in after plugin. The list of attributes differs for each type of user. Reviewing the source code of the magento/customer-module (v2.4.0 here) I can see that attributes are handled somewhat differently than they are from the magento/module-catalog extension. The full documentation on GraphQL is available on Magento DevDocs page GraphQL. SearchResultFactory -> create () $this -> collectionProcessor -> process ( $searchCriteria, $searchResult ) $searchResult -> setSearchCriteria ( $searchCriteria ) foreach ( $searchResult -> getItems () as $order )
