X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (X-Cart 5) (https://forum.x-cart.com/forumdisplay.php?f=56)
-   -   Top Menu decorator (https://forum.x-cart.com/showthread.php?t=75119)

oleg@navtool.com 03-22-2017 12:19 PM

Top Menu decorator
1 Attachment(s)

Im trying to understand how i can find actual class which responsible for view creation. According to doc we using Webmaster Kit to see templates and classes and it shows attached trace and looks like the view class is

After digging through the code it looks like the actual implementation is in
\XLite\Module\CDev\SimpleCMS\View\Menu\Customer\To p.php file but i don't see it anywhere in trace.

How we can find which actual class responsible for view? Which class is being decorated by which?

qualiteam 03-30-2017 01:18 AM

Re: Top Menu decorator
The view class is \XLite\View\Menu\Customer\Top, but modules can "decorate" it by extending their classes from this class and implemeting the IDecorator interface as follows:
PHP Code:

namespace XLite\Module\CDev\SimpleCMS\View\Menu\Customer;

Top extends \XLite\View\Menu\Customer\Top implements \XLite\Base\IDecorator
// ...

To find every class that affects the base class you should search the source code for "extends BASE_CLASS" string like in the above example.

All times are GMT -8. The time now is 01:36 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.