PHP code example of lcbrq / openmage-custom-messages
1. Go to this page and download the library: Download lcbrq/openmage-custom-messages library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
lcbrq / openmage-custom-messages example snippets
class Vendor_Module_Rewrite_CustomMessages_Model_System_Config_Handle extends LCB_CustomMessages_Model_System_Config_Handle
{
/**
* @return array
*/
public function toOptionArray()
{
$options = parent::toOptionArray();
$helper = Mage::helper('core');
$custom = array();
$custom['custom_handle'] = $helper->__('Custom Handle');
foreach ($custom as $key => $option) {
$custom[$key] = "$option ($key)";
}
$options = array_merge($options, $custom);
asort($options);
return $options;
}
}