Public Member Functions | |
initForm () |
Definition at line 35 of file Form.php.
initForm | ( | ) |
Initialize cache management form
Definition at line 42 of file Form.php.
00043 { 00044 $form = new Varien_Data_Form(); 00045 00046 $fieldset = $form->addFieldset('cache_enable', array( 00047 'legend' => Mage::helper('adminhtml')->__('Cache Control') 00048 )); 00049 00050 $fieldset->addField('all_cache', 'select', array( 00051 'name'=>'all_cache', 00052 'label'=>'<strong>'.Mage::helper('adminhtml')->__('All Cache').'</strong>', 00053 'value'=>1, 00054 'options'=>array( 00055 '' => Mage::helper('adminhtml')->__('No change'), 00056 'refresh' => Mage::helper('adminhtml')->__('Refresh'), 00057 'disable' => Mage::helper('adminhtml')->__('Disable'), 00058 'enable' => Mage::helper('adminhtml')->__('Enable'), 00059 ), 00060 )); 00061 00062 foreach (Mage::helper('core')->getCacheTypes() as $type=>$label) { 00063 $fieldset->addField('enable_'.$type, 'checkbox', array( 00064 'name'=>'enable['.$type.']', 00065 'label'=>Mage::helper('adminhtml')->__($label), 00066 'value'=>1, 00067 'checked'=>(int)Mage::app()->useCache($type), 00068 //'options'=>$options, 00069 )); 00070 } 00071 00072 $fieldset = $form->addFieldset('beta_cache_enable', array( 00073 'legend' => Mage::helper('adminhtml')->__('Cache Control (beta)') 00074 )); 00075 00076 foreach (Mage::helper('core')->getCacheBetaTypes() as $type=>$label) { 00077 $fieldset->addField('beta_enable_'.$type, 'checkbox', array( 00078 'name'=>'beta['.$type.']', 00079 'label'=>Mage::helper('adminhtml')->__($label), 00080 'value'=>1, 00081 'checked'=>(int)Mage::app()->useCache($type), 00082 )); 00083 } 00084 00085 $this->setForm($form); 00086 00087 return $this; 00088 }