Public Member Functions | |
getProcess () | |
getChangeStatusButtonHtml () | |
getRunFormAction () | |
canRunCompilation () | |
getMessagesBlock () | |
getCompilationList () | |
arrToSting ($arr) | |
getCompilerState () | |
getCompilerStatus () | |
getCollectedFilesCount () | |
getCompiledFilesCount () | |
Protected Member Functions | |
_construct () | |
_prepareLayout () | |
getHeader () | |
getRunButtonHtml () | |
Protected Attributes | |
$_process | |
$_validationResult |
Definition at line 35 of file Process.php.
_construct | ( | ) | [protected] |
Internal constructor, that is called from real constructor
Please override this one instead of overriding real __construct constructor
Please override this one instead of overriding real __construct constructor
Reimplemented from Mage_Core_Block_Abstract.
Definition at line 46 of file Process.php.
00047 { 00048 $this->_process = Mage::getModel('compiler/process'); 00049 $this->_validationResult = $this->_process->validate(); 00050 return parent::_construct(); 00051 }
_prepareLayout | ( | ) | [protected] |
Preparing global layout
You can redefine this method in child classes for changin layout
Reimplemented from Mage_Core_Block_Abstract.
Definition at line 63 of file Process.php.
00064 { 00065 $this->setChild('run_button', 00066 $this->getLayout()->createBlock('adminhtml/widget_button') 00067 ->setData(array( 00068 'label' => Mage::helper('compiler')->__('Run Compilation Process'), 00069 'onclick' => 'compilationForm.submit();', 00070 'class' => 'save' 00071 ))); 00072 00073 if (defined('COMPILER_INCLUDE_PATH')) { 00074 $this->setChild('change_status_button', 00075 $this->getLayout()->createBlock('adminhtml/widget_button') 00076 ->setData(array( 00077 'label' => Mage::helper('compiler')->__('Disable'), 00078 'onclick' => 'setLocation(\'' . $this->getUrl('compiler/process/disable') . '\')', 00079 'class' => 'save' 00080 ))); 00081 } else { 00082 $this->setChild('change_status_button', 00083 $this->getLayout()->createBlock('adminhtml/widget_button') 00084 ->setData(array( 00085 'label' => Mage::helper('compiler')->__('Enable'), 00086 'onclick' => 'setLocation(\'' . $this->getUrl('compiler/process/enable') . '\')', 00087 'class' => 'save' 00088 ))); 00089 } 00090 00091 return parent::_prepareLayout(); 00092 }
arrToSting | ( | $ | arr | ) |
canRunCompilation | ( | ) |
getChangeStatusButtonHtml | ( | ) |
Definition at line 104 of file Process.php.
00105 { 00106 if ($this->getCollectedFilesCount()) { 00107 return $this->getChildHtml('change_status_button'); 00108 } 00109 return ''; 00110 }
getCollectedFilesCount | ( | ) |
Definition at line 184 of file Process.php.
00185 { 00186 if (!$this->hasData('collected_files_count')) { 00187 $this->setData('collected_files_count', $this->getProcess()->getCollectedFilesCount()); 00188 } 00189 return $this->_getData('collected_files_count'); 00190 }
getCompilationList | ( | ) |
Definition at line 156 of file Process.php.
00157 { 00158 return $this->getProcess()->getCompileClassList(); 00159 }
getCompiledFilesCount | ( | ) |
Definition at line 192 of file Process.php.
00193 { 00194 if (!$this->hasData('compiled_files_count')) { 00195 $this->setData('compiled_files_count', $this->getProcess()->getCompiledFilesCount()); 00196 } 00197 return $this->_getData('compiled_files_count'); 00198 }
getCompilerState | ( | ) |
Definition at line 166 of file Process.php.
00167 { 00168 if ($this->getCollectedFilesCount() > 0) { 00169 return $this->__('Compiled'); 00170 } else { 00171 return $this->__('Not Compiled'); 00172 } 00173 }
getCompilerStatus | ( | ) |
Definition at line 175 of file Process.php.
00176 { 00177 if (defined('COMPILER_INCLUDE_PATH')) { 00178 return $this->__('Enabled'); 00179 } else { 00180 return $this->__('Disabled'); 00181 } 00182 }
getHeader | ( | ) | [protected] |
Get page header text
Definition at line 99 of file Process.php.
00100 { 00101 return Mage::helper('compiler')->__('Compilation (Beta)'); 00102 }
getMessagesBlock | ( | ) |
Get messages block
Reimplemented from Mage_Core_Block_Abstract.
Definition at line 147 of file Process.php.
00148 { 00149 $block = $this->getLayout()->createBlock('core/messages'); 00150 foreach ($this->_validationResult as $message) { 00151 $block->addError($message); 00152 } 00153 return $block; 00154 }
getProcess | ( | ) |
Get compilation process object
Definition at line 58 of file Process.php.
getRunButtonHtml | ( | ) | [protected] |
Get html code of rum button
Definition at line 117 of file Process.php.
00118 { 00119 return $this->getChildHtml('run_button'); 00120 }
getRunFormAction | ( | ) |
Get process run url
Definition at line 127 of file Process.php.
00128 { 00129 return $this->getUrl('compiler/process/recompile'); 00130 }
$_process [protected] |
Definition at line 42 of file Process.php.
$_validationResult [protected] |
Definition at line 43 of file Process.php.