Enabledisable
Magento\Config\Model\Config\Source\Enabledisable
What it does
This class provides a standardized source model for Enable/Disable dropdown options in Magento 2 admin configuration forms.
Developers use this class when creating system configuration fields that need simple enable/disable functionality, ensuring consistent values (1 for Enable, 0 for Disable) across the application.
It implements the ArrayInterface to return formatted option arrays for form elements.
Public Methods
- toOptionArray()