Ejemplo n.º 1
0
 protected function _getDummyXml($design, $category)
 {
     $option_model_name = current(explode("_", get_class($this)));
     $dummy_xml = Core_Model_Directory::getBasePathToModule($option_model_name, "data/dummy_" . $category->getCode() . ".xml");
     if (!is_file($dummy_xml)) {
         throw new Exception($this->_('An error occurred while saving'));
     }
     $dummy_content_xml = simplexml_load_file($dummy_xml);
     if (!$dummy_content_xml->{$design->getCode()}) {
         throw new Exception($this->_('An error occurred while saving'));
     }
     return $dummy_content_xml->{$design->getCode()};
 }