Registry and Register in Magento 2
Registry and Register in Magento 2 Registry: The Registry in Magento 2 is an instance of \Magento\Framework\Registry class. It allows you to store and retrieve data using a key-based approach. Storing Data: use Magento\Framework\Registry; $registry = $objectManager->get(Registry::class); $registry->register(‘key_name’, $value); Retrieving Data: $data = $registry->registry(‘key_name’); Register: The Register in Magento 2 is an instance of \Magento\Framework\RegisterInterface […]
Read More