/**
  * Prepare collection with passed data
  * @param mixed $data 
  */
 public function _prepare($data = null)
 {
     $config = Mage::getConfig()->getNode('global/rewrite');
     if ($config) {
         foreach ($config->children() as $node) {
             $item = new Varien_Object();
             $item->setTo($node->to);
             $item->setFrom($node->from);
             $item->setClass($node->getName());
             $this->addItem($item);
         }
     }
 }
 /**
  * Prepare collection with passed data
  * @param mixed $data 
  */
 public function _prepare($filter = null)
 {
     $config = Mage::getConfig()->getNode($this->_scope[$filter])->children();
     foreach ($config as $node) {
         $path = $this->_scope[$filter] . '/' . $node->getName() . '/args';
         $conf = Mage::getConfig()->getNode($path)->children();
         foreach ($conf->modules as $modules) {
             $module = $modules->children();
             $item = new Varien_Object();
             $item->setTo((string) $module);
             $attributes = $module->attributes();
             $item->setFrom((string) $attributes[0]);
             $item->setDirection((string) $attributes->getName());
             $this->addItem($item);
         }
     }
 }
 /**
  * Prepare collection with passed data
  * @param mixed $data 
  */
 public function _prepare($filter = null)
 {
     $config = Mage::getConfig()->getNode('global/' . $filter)->children();
     foreach ($config as $node) {
         foreach ($node->rewrite as $r) {
             foreach ($r->children() as $a) {
                 $name = explode('_', $a->getName());
                 foreach ($name as $k => $n) {
                     $name[$k] = ucfirst(strtolower($n));
                 }
                 $node_class = 'Mage_' . ucfirst($node->getName()) . '_Helper';
                 if ($node->class) {
                     $node_class = $node->class;
                 }
                 $name = array_merge(array($node_class), $name);
                 $item = new Varien_Object();
                 $item->setTo((string) $a);
                 $item->setFrom(implode('_', $name));
                 $this->addItem($item);
             }
         }
     }
 }