00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035 class Mage_Adminhtml_Block_System_Cache_Form extends Mage_Adminhtml_Block_Widget_Form
00036 {
00037
00038
00039
00040
00041
00042 public function initForm()
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
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 }
00089 }