Public Member Functions | |
__construct () | |
getRunButtonHtml () | |
getProfileId () | |
getImportedFiles () | |
getParseType () |
Definition at line 34 of file Run.php.
__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 }
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 | ( | ) |
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 }