When templates hints are turned ON , it is shown that
Magento\Checkout\Block\Cart\Sidebar\Interceptor
is responsible for
/var/www/html/magento/vendor/magento/module-checkout/view/frontend/templates/cart/minicart.phtml
when I browsed to the loaction
/vendor/magento/module-checkout/Block/Cart
There is Sidebar.php
Not Sidebar/Interceptor.php, which is expected from the block name conventions followed by magento.
Where can I find the file?
Also In which layout file the minicart.phtml file is defined?
1 Answer 1
The classes that end with Interceptor, Proxy and Factory (but not all of them) may be found in generated/code folder.
They all look very similar.
But please don't change them because they get regenerated. 
You will see that all Interceptor classes have the following characteristics: 
They extend a class with the same as the current class except there is a missing "interceptor" at the end.
All methods in the interceptor look like this:
public function methodNameHere(parameters here)
{
 $pluginInfo = $this->pluginList->getNext($this->subjectType, 'methodNameHere');
 if (!$pluginInfo) {
 return parent::methodNameHere(parameters here);
 } else {
 return $this->___callPlugins('methodNameHere', func_get_args(), $pluginInfo);
 }
}
This is a method to change the behavior of a function without changing the function itself.
Read more about code generation and plugins 
- 
 That's most satisfying answer. Hats offshabeeb ali– shabeeb ali2018年07月06日 08:56:40 +00:00Commented Jul 6, 2018 at 8:56