Method: getEditorData

This method returns an array of data that can be used to help the user select various options. For example, we'll define a list of locations the user can select from. We can then access this data from our display template to output a dropdown list for the user.

Example 3.2. An example of the getEditorData() method

<?php
    class Driver_containers_rule_weather_controller extends Module_Containers_Driver_Abstract
    {
        // ...
        
        public function getEditorData()
        {
            return array(
                'locations' => array(
                    'Adelaide', 'Melbourne', 'Sydney', 'Brisbane'
                )
            );
        }
        
        // ...
    }
?>