Magento rewrite block mage bundle

magento

I have few core files modifications in my app/code/local/Mage folder, but I wan’t to make them work as magento module.
I am creating a module that will add a custom for bundle product. For that I came to a situation in which, I have to overwrite the core block

magento
app/code/local/Mycompany/Custom/etc/config.xml:

<config>
	<global>
		<blocks>
            <bundle>
                <rewrite>
                    <adminhtml_catalog_product_edit_tab_bundle_option_search_grid>Mycompany_Custom_Block_Bundle_Catalog_Product_Edit_Tab_Option_Search_Grid</adminhtml_catalog_product_edit_tab_bundle_option_search_grid>
                </rewrite>
            </bundle>
		</blocks>
	</global>
</config>

 

app/code/local/Mycompany/Custom/Block/Bundle/Catalog/Product/Edit/Tab/Option/Search/Grid.php

 

<?php
class Mycompany_Custom_Block_Bundle_Catalog_Product_Edit_Tab_Option_Search_Grid extends Mage_Bundle_Block_Adminhtml_Catalog_Product_Edit_Tab_Bundle_Option_Search_Grid
{
	//code here
}

 

Thanks for watching!