\Magento\Framework\Data\CollectionDataSourceInterface, to be more precise.

So imagine having this in - say - cms_index_index.xml:

<block class="Some\Block" name="block" template="tpl.phtml">
        <argument name="someObj" xsi:type="object">Some\Object</argument>

Block arguments of type object are resolved via \Magento\Framework\View\Layout\Argument\Interpreter\DataObject, class which does a seemingly useless thing: it's checking if your passed object is of type \Magento\Framework\Data\CollectionDataSourceInterface, throwing an exception if it's not.

Does anyone have the slightest clue as to why this validation is needed? The interface is - for now, at least - empty (marker interface).

Related post: http://magento-quickies.alanstorm.com/post/148712996610/a-typical-magento-2-programming-experience/embed

1 Answer 1


Reply posted here: https://github.com/magento/magento2/issues/1166#issuecomment-90084974:

Originally this type of argument was developed for Admin Widget Grids to allow passing Collections as an argument to Grid constructor and it had being restricted to "Magento\Framework\Data\Collection". After a while instead of that there was created an empty marking interface, so now you may pass some custom types of collections with more soft restriction - they all should implement this very CollectionDataSourceInterface.

It's been moved in forums. It's the same as deleting it. So.. yeah, I guess that's it then.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.