Mage_Adminhtml_Block_System_Cache_Edit Class Reference

Inheritance diagram for Mage_Adminhtml_Block_System_Cache_Edit:

Mage_Adminhtml_Block_Widget Mage_Adminhtml_Block_Template Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object

List of all members.

Public Member Functions

 __construct ()
 getSaveButtonHtml ()
 getSaveUrl ()
 initForm ()
 getCatalogData ()

Protected Member Functions

 _prepareLayout ()


Detailed Description

Definition at line 34 of file Edit.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 Edit.php.

00037     {
00038         parent::__construct();
00039         $this->setTemplate('system/cache/edit.phtml');
00040         $this->setTitle('Cache Management');
00041     }


Member Function Documentation

_prepareLayout (  )  [protected]

Preparing global layout

You can redefine this method in child classes for changin layout

Returns:
Mage_Core_Block_Abstract

Reimplemented from Mage_Core_Block_Abstract.

Definition at line 43 of file Edit.php.

00044     {
00045         $this->setChild('save_button',
00046             $this->getLayout()->createBlock('adminhtml/widget_button')
00047                 ->setData(array(
00048                     'label'     => Mage::helper('adminhtml')->__('Save cache settings'),
00049                     'onclick'   => 'configForm.submit()',
00050                     'class' => 'save',
00051                 ))
00052         );
00053         return parent::_prepareLayout();
00054     }

getCatalogData (  ) 

Retrieve Catalog Tools Data

Returns:
array

Definition at line 80 of file Edit.php.

00081     {
00082         $layeredIsDisabled = false;
00083         $warning = '';
00084 
00085         $flag = Mage::getModel('catalogindex/catalog_index_flag')->loadSelf();
00086         switch ($flag->getState()) {
00087             case Mage_CatalogIndex_Model_Catalog_Index_Flag::STATE_QUEUED:
00088                 $layeredAction = Mage::helper('adminhtml')->__('Queued... Cancel');
00089                 //$layeredIsDisabled = true;
00090                 break;
00091             case Mage_CatalogIndex_Model_Catalog_Index_Flag::STATE_RUNNING:
00092                 $layeredAction = Mage::helper('adminhtml')->__('Running... Kill');
00093                 $warning = Mage::helper('adminhtml')->__('Do you really want to KILL parallel process and start new indexing process?');
00094                 //$layeredIsDisabled = true;
00095                 //$nowIsDisabled = true;
00096                 break;
00097             default:
00098                 $layeredAction = Mage::helper('adminhtml')->__('Queue Refresh');
00099                 //$layeredIsDisabled = false;
00100                 break;
00101         }
00102 
00103         return array(
00104             'refresh_catalog_rewrites'   => array(
00105                 'label'     => Mage::helper('adminhtml')->__('Catalog Rewrites'),
00106                 'buttons'   => array(
00107                     array(
00108                         'name'      => 'refresh_catalog_rewrites',
00109                         'action'    => Mage::helper('adminhtml')->__('Refresh'),
00110                         )
00111                 ),
00112             ),
00113             'clear_images_cache'         => array(
00114                 'label'     => Mage::helper('adminhtml')->__('Images Cache'),
00115                 'buttons'   => array(
00116                     array(
00117                         'name'      => 'clear_images_cache',
00118                         'action'    => Mage::helper('adminhtml')->__('Clear'),
00119                         )
00120                 ),
00121             ),
00122             'refresh_layered_navigation' => array(
00123                 'label'     => Mage::helper('adminhtml')->__('Layered Navigation Indices'),
00124                 'buttons'   => array(
00125                     array(
00126                         'name'      => 'refresh_layered_navigation',
00127                         'action'    => $layeredAction,
00128                         'disabled'  => $layeredIsDisabled,
00129                         ),
00130                     array(
00131                         'name'      => 'refresh_layered_navigation_now',
00132                         'action'    => Mage::helper('adminhtml')->__('Refresh Now*'),
00133                         'comment'   => Mage::helper('adminhtml')->__('* - If indexing is in progress, it will be killed and new indexing process will start'),
00134                         'warning'   => $warning,
00135                         )
00136                 ),
00137             ),
00138             'rebuild_search_index'      => array(
00139                 'label'     => Mage::helper('adminhtml')->__('Search Index'),
00140                 'buttons'   => array(
00141                     array(
00142                         'name'      => 'rebuild_search_index',
00143                         'action'    => Mage::helper('adminhtml')->__('Rebuild'),
00144                     )
00145                 ),
00146             ),
00147             'rebuild_inventory_stock_status' => array(
00148                 'label'     => Mage::helper('adminhtml')->__('Inventory Stock Status'),
00149                 'buttons'   => array(
00150                     array(
00151                         'name'      => 'rebuild_inventory_stock_status',
00152                         'action'    => Mage::helper('adminhtml')->__('Refresh'),
00153                     )
00154                 ),
00155             ),
00156             'rebuild_catalog_index'         => array(
00157                 'label'     => Mage::helper('adminhtml')->__('Rebuild Catalog Index'),
00158                 'buttons'   => array(
00159                     array(
00160                         'name'      => 'rebuild_catalog_index',
00161                         'action'    => Mage::helper('adminhtml')->__('Rebuild'),
00162                     )
00163                 ),
00164             ),
00165             'rebuild_flat_catalog_category' => array(
00166                 'label'     => Mage::helper('adminhtml')->__('Rebuild Flat Catalog Category'),
00167                 'buttons'   => array(
00168                     array(
00169                         'name'      => 'rebuild_flat_catalog_category',
00170                         'action'    => Mage::helper('adminhtml')->__('Rebuild'),
00171                     )
00172                 ),
00173             ),
00174             'rebuild_flat_catalog_product' => array(
00175                 'label'     => Mage::helper('adminhtml')->__('Rebuild Flat Catalog Product'),
00176                 'buttons'   => array(
00177                     array(
00178                         'name'      => 'rebuild_flat_catalog_product',
00179                         'action'    => Mage::helper('adminhtml')->__('Rebuild'),
00180                     )
00181                 ),
00182             ),
00183         );
00184     }

getSaveButtonHtml (  ) 

Definition at line 56 of file Edit.php.

00057     {
00058         return $this->getChildHtml('save_button');
00059     }

getSaveUrl (  ) 

Definition at line 61 of file Edit.php.

00062     {
00063         return $this->getUrl('*/*/save', array('_current'=>true));
00064     }

initForm (  ) 

Definition at line 66 of file Edit.php.

00067     {
00068         $this->setChild('form',
00069             $this->getLayout()->createBlock('adminhtml/system_cache_form')
00070                 ->initForm()
00071         );
00072         return $this;
00073     }


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

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