Synopsis
I have a question regarding the best practices with Magento dependencies. Essentially I have a custom module that overrides Mage_Adminhtml_Catalog_ProductController
this currently works providing I include the Magento core class prior to extending (generally what you'd expect).
My code looks something along the lines of:
<?php
require_once Mage::getModuleDir('controllers', 'Mage_Adminhtml') . DS . 'Catalog/ProductController.php';
class Vendor_Module_Adminhtml_Catalog_ProductController
extends Mage_Adminhtml_Catalog_ProductController
{
// My things go here.
}
My question is simply to understand if theres a nicer method of including core classes for overriding (see example)?
Example
require_once Mage::getModuleDir('controllers', 'Mage_Adminhtml') . DS . 'Catalog/ProductController.php';