Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Top Menu decorator

 
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 03-22-2017, 12:19 PM
 
oleg@navtool.com oleg@navtool.com is offline
    
Join Date: Dec 2015
Posts: 0
 

Default Top Menu decorator

Hi,

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
\XLite\View\Menu\Customer\Top.php

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?
Attached Thumbnails
Click image for larger version

Name:	trace.png
Views:	304
Size:	219.2 KB
ID:	4880  
__________________
5.2.10
Reply With Quote
  #2  
Old 03-30-2017, 01:18 AM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default 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:
<?php
namespace XLite\Module\CDev\SimpleCMS\View\Menu\Customer;

class 
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.
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
Reply With Quote
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 09:10 AM.

   

 
X-Cart forums © 2001-2020