Log in
Model

Variables

Magento\Variable\Model\Source\Variables

What it does

This class provides a source model for retrieving available configuration variables that can be used in Magento's content areas like CMS pages, blocks, and emails.

Developers use this class to populate dropdowns or lists of available system configuration variables (like store contact information) that can be inserted using the {{config path="..."}} directive.

It organizes variables by their configuration groups and makes them available in both flat and grouped formats.

Public Methods

  • toOptionArray()
  • getData()
  • getAvailableVars()