Guest User

Untitled

a guest
Jan 17th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. require_once(Mage::getModuleDir('controllers','Mage_CatalogSearch').DS.'ResultController.php');
  2. abstract class Result extends Mage_CatalogSearch_ResultController
  3. {
  4. ...
  5. }
  6.  
  7. protected $moduleReader;
  8. public function __construct(
  9. ...
  10. MagentoFrameworkModuleDirReader $moduleReader,
  11. ....
  12. ) {
  13. ....
  14. $this->moduleReader = $moduleReader;
  15. ....
  16. }
  17.  
  18. $this->moduleReader->getModuleDir('Controller', 'Magento_CatalogSearch');
  19.  
  20. use MagentoFrameworkViewResultPageFactory;
  21.  
  22. class Test{
  23. protected $resultPageFactory;
  24. public function __construct(
  25. PageFactory $resultPageFactory
  26. ) {
  27. $this->resultForwardFactory = $resultForwardFactory;
  28. }
  29. public function getanotherClass(){
  30. $this->resultForwardFactory->getFunctionfromFile();
  31. }
  32.  
  33. }
Add Comment
Please, Sign In to add comment