Log in
Collection

Variable\Collection

Magento\Variable\Model\ResourceModel\Variable\Collection

What it does

This collection class manages and retrieves custom variables in Magento 2.

Developers use it to load, filter, and manipulate sets of custom variables, particularly when they need to fetch variable values for specific store views or prepare variable data for dropdowns and select lists in the admin interface.

Public Methods

  • setStoreId()
  • getStoreId()
  • addValuesToResult()
  • toOptionArray()