loadLayout() ->_addContent($this->getLayout()->createBlock('aw_lib/log_log')) ->renderLayout(); } /** * Clears all records in log table * */ public function clearAction() { $resource = Mage::getSingleton('core/resource'); try { $connection = $resource->getConnection('core_write'); $connection->query("TRUNCATE TABLE {$resource->getTableName('aw_lib/logger')}"); Mage::getSingleton('adminhtml/session')->addSuccess("Log successfully cleared"); $this->_redirect('*/*'); } catch (Mage_Core_Exception $E) { Mage::getSingleton('adminhtml/session')->addError($E->getMessage()); $this->_redirectReferer(); } return $this; } }