Magento Basic – Part 3

frontend_model:

Instead of a frontend_type you may also specify a block name in the typical module/path_to_file format. This block will have _getElementHtml() method called, use this to return the HTML for the field’s control. Even though it is called frontend_model it really is a block.

source_model:

For all list types of field the possible options are supplied by a model class you specify. Mage/Adminhtml/Model/System/Config/Source directory contains lots of useful sources already defined like “Yes/No” or “Enable/Disable” or lists of countries, currencies or languages.

backend_model:

A field’s config data is normally stored in a core/config_data model but you can also define your own. It’s _afterLoad() method is called before the field is shown, and the _beforeSave() & _afterSave() methods are called when a user clicks the ‘Save Config’ button. Use these events to perform extra checks on the data, possibly throwing an exception in _beforeSave() or updating local files in _afterSave().

——————————————————————————————————————————————————————

Corner of Blog:

“Save Water Live Better”

——————————————————————————————————————————————————————

 

Leave a Reply