Skip to main content
added 29 characters in body
Source Link
fmsthird
  • 4.6k
  • 4
  • 18
  • 42

In di.xmldi.xml use,

< preference for="Magento\Theme\Block\Html\Pager" type="MyVendor\Core\Block\Html\Pager"/>

<preference for="Magento\Theme\Block\Html\Pager" type="MyVendor\Core\Block\Html\Pager"/>

In MyVendor\Core\Block\Html\PagerMyVendor\Core\Block\Html\Pager use,

namespace MyVendor\Core\Block\Html;

namespace MyVendor\Core\Block\Html;

Extend the class by using,

class Pager extends \Magento\Theme\Block\Html\Pager

{

class Pager extends \Magento\Theme\Block\Html\Pager
{
public function MyCustomFunction()

{
   return "working";

} 
}

}

In di.xml use,

< preference for="Magento\Theme\Block\Html\Pager" type="MyVendor\Core\Block\Html\Pager"/>

In MyVendor\Core\Block\Html\Pager use,

namespace MyVendor\Core\Block\Html;

Extend the class by using,

class Pager extends \Magento\Theme\Block\Html\Pager

{

public function MyCustomFunction()

{
   return "working";

} 

}

In di.xml use,

<preference for="Magento\Theme\Block\Html\Pager" type="MyVendor\Core\Block\Html\Pager"/>

In MyVendor\Core\Block\Html\Pager use,

namespace MyVendor\Core\Block\Html;

Extend the class by using,

class Pager extends \Magento\Theme\Block\Html\Pager
{
public function MyCustomFunction()

{
   return "working";

} 
}
added 3 characters in body
Source Link

In di.xml use,  

< preference for="Magento\Theme\Block\Html\Pager" type="MyVendor\Core\Block\Html\Pager"/>

In MyVendor\Core\Block\Html\Pager use,

namespace MyVendor\Core\Block\Html;

Extend the class by using,

class Pager extends \Magento\Theme\Block\Html\Pager

{

public function MyCustomFunction()

{
   return "working";

} 

}

In di.xml use,  

In MyVendor\Core\Block\Html\Pager use,

namespace MyVendor\Core\Block\Html;

Extend the class by using,

class Pager extends \Magento\Theme\Block\Html\Pager

{

public function MyCustomFunction()

{
   return "working";

} 

}

In di.xml use,

< preference for="Magento\Theme\Block\Html\Pager" type="MyVendor\Core\Block\Html\Pager"/>

In MyVendor\Core\Block\Html\Pager use,

namespace MyVendor\Core\Block\Html;

Extend the class by using,

class Pager extends \Magento\Theme\Block\Html\Pager

{

public function MyCustomFunction()

{
   return "working";

} 

}

Source Link

In di.xml use,

In MyVendor\Core\Block\Html\Pager use,

namespace MyVendor\Core\Block\Html;

Extend the class by using,

class Pager extends \Magento\Theme\Block\Html\Pager

{

public function MyCustomFunction()

{
   return "working";

} 

}