Mage_Adminhtml_Block_System_Convert_Profile_Edit_Tab_Run Class Reference

Inheritance diagram for Mage_Adminhtml_Block_System_Convert_Profile_Edit_Tab_Run:

Mage_Adminhtml_Block_Template Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object

List of all members.

Public Member Functions

 __construct ()
 getRunButtonHtml ()
 getProfileId ()
 getImportedFiles ()
 getParseType ()


Detailed Description

Definition at line 34 of file Run.php.


Constructor & Destructor Documentation

__construct (  ) 

Constructor

By default is looking for first argument as array and assignes it as object attributes This behaviour may change in child classes

Reimplemented from Varien_Object.

Definition at line 36 of file Run.php.

00037     {
00038         parent::__construct();
00039         $this->setTemplate('system/convert/profile/run.phtml');
00040     }


Member Function Documentation

getImportedFiles (  ) 

Definition at line 73 of file Run.php.

00074     {
00075         $files = array();
00076         $path = Mage::app()->getConfig()->getTempVarDir().'/import';
00077         if (!is_readable($path)) {
00078             return $files;
00079         }
00080         $dir = dir($path);
00081         while (false !== ($entry = $dir->read())) {
00082             if($entry != '.'
00083                && $entry != '..'
00084                && in_array(strtolower(substr($entry, strrpos($entry, '.')+1)), array($this->getParseType())))
00085             {
00086                 $files[] = $entry;
00087             }
00088         }
00089         $dir->close();
00090         return $files;
00091     }

getParseType (  ) 

Definition at line 93 of file Run.php.

00094     {
00095         $data = Mage::registry('current_convert_profile')->getGuiData();
00096         if ($data)
00097             return ($data['parse']['type'] == 'excel_xml') ? 'xml': $data['parse']['type'];
00098     }

getProfileId (  ) 

Definition at line 68 of file Run.php.

00069     {
00070         return Mage::registry('current_convert_profile')->getId();
00071     }

getRunButtonHtml (  ) 

Definition at line 42 of file Run.php.

00043     {
00044         $html = '';
00045 /*
00046         if (Mage::registry('current_convert_profile')->getDirection()=='import') {
00047             $html .= $this->getLayout()->createBlock('adminhtml/widget_button')->setType('button')
00048                 ->setLabel($this->__('Upload import file'))
00049                 ->setOnClick('showUpload()')
00050                 ->toHtml();
00051         }
00052 */
00053         /*
00054         $html .= $this->getLayout()->createBlock('adminhtml/widget_button')->setType('button')
00055             ->setClass('save')->setLabel($this->__('Run Profile Inside This Window'))
00056             ->setOnClick('runProfile()')
00057             ->toHtml();
00058         */
00059 
00060         $html .= $this->getLayout()->createBlock('adminhtml/widget_button')->setType('button')
00061             ->setClass('save')->setLabel($this->__('Run Profile In Popup'))
00062             ->setOnClick('runProfile(true)')
00063             ->toHtml();
00064 
00065         return $html;
00066     }


The documentation for this class was generated from the following file:

Generated on Sat Jul 4 17:23:04 2009 for Magento by  doxygen 1.5.8