cancel
Showing results for 
Search instead for 
Did you mean: 

Bless Magento\Customer\CustomerData\SectionSourceInterface and related classes with @api annotation

0 Kudos

Bless Magento\Customer\CustomerData\SectionSourceInterface and related classes with @api annotation

In order to display customer data on pages cached in the full page cache (Varnish or built in), the Magento framework and Magento customer module provide a number of related tools that enable this feature.

Some details are outlined in the official documentation found at http://devdocs.magento.com/guides/v2.1/config-guide/cache/cache-priv-priv.html

 

Creating such a dynamic section on a cached page requires the use of two interfaces:

 

* Magento\Customer\CustomerData\SectionPoolInterface

* Magento\Customer\CustomerData\SectionSourceInterface

 

The interface Magento\Customer\CustomerData\SectionPoolInterface is only referenced in the configuration file etc/frontend/di.xml, but the interface Magento\Customer\CustomerData\SectionSourceInterface has to be implemented in a custom class.

 

These interfaces currently are not marked with the @api annotation. Please add this annotation so the feature can be used in custom modules.

 

This actually also extends to the JavaScript "classes" Magento_Customer/js/customer-data and Magento_Ui/js/lib/core/element/element (a.k.a uiElement). Please also mark these as stable so the feature can be used as described in the documentation.

Thank you!