Excludes Decorators doesn't work
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Excludes Decorators doesn't work
Hello everyone,
I want to exclude some decorators from the service module, I have tried several configurations in my custom theme but none of them work:
admin.php:
controller.php:
mshop.php:
These two decorators are still on display in the Service module. none of the configurations I listed above work.
I even cleared all the cache and it still does not work.
I would appreciate your help,
Regards!
I want to exclude some decorators from the service module, I have tried several configurations in my custom theme but none of them work:
admin.php:
Code: Select all
<?php
return [
'jqadm' => [
'service' => [
'decorators' => [
'excludes' => [
'Country',
'Download'
]
]
]
],
'jsonadm' => [
],
];
Code: Select all
'frontend' => [
'catalog' => [
'levels-always' => 3 // number of category levels for mega menu
],
'service' => [
'decorators' => [
'excludes' => [
'Country',
'Download'
]
]
]
],
Code: Select all
<?php
return [
'service' => [
'manager' => [
'decorators' => [
'excludes' => [
'Country',
'Download'
]
],
'lists' => [
'decorators' => [
'excludes' => [
'Country',
'Download'
]
]
]
],
]
];
I even cleared all the cache and it still does not work.
I would appreciate your help,
Regards!
Re: Excludes Decorators doesn't work
Excluding manager decorators for certain domains only work if you've configured them for all domains before.
The service decorators can't be removed from the list in the service panel because they are discovered automatically due to their file system location.
The service decorators can't be removed from the list in the service panel because they are discovered automatically due to their file system location.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: Excludes Decorators doesn't work
Oh ok! Now I understand about the service decorators, thanks!
I'm still not clear about "manager decorators for certain domains". I have read the documentation several times but I still don't understand exactly the functionality.
If possible, could you share an example of this?
Again, thank you very much for your help!
I'm still not clear about "manager decorators for certain domains". I have read the documentation several times but I still don't understand exactly the functionality.
If possible, could you share an example of this?
Again, thank you very much for your help!
Re: Excludes Decorators doesn't work
You can configure a manager decorator globally for all domains (product, catalog, order, etc.):
There may be some domains where this decorator should not be applied to. Instead of configuring all domains the decorator should be applied to, you can now tell Aimeos to exclude certain domains:
Also, you can implement decorators for certain domains only, e.g. for the catalog domains which manages a tree and has methods like getPath(), getTree(), move() etc. which are not available in all other domains. These are local decorators which can't be applied to other domains due to their namespace:
Code: Select all
return [
'common' => [
'manager' => [
'decorators' => [
'global' => ['Myproject']
]
]
]
];
Code: Select all
return [
'locale' => [
'manager' => [
'site' => [
'decorators' => [
'exclude' => ['Myproject']
]
]
]
],
'order' => [
'manager' => [
'decorators' => [
'exclude' => ['Myproject']
]
]
]
];
Code: Select all
return [
'catalog' => [
'manager' => [
'decorators' => [
'local' => ['Mytreedecorator']
]
]
]
];
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: Excludes Decorators doesn't work
Thank you very much!!!
Now I understand the functionality of the decorators. Just yesterday I implemented 2 decorators and it has been amazing.
I don't know if they exist in other projects, but the decorators seem to me an excellent idea. They are really very useful. congratulations!
Again, thank you very much for taking the time to answer and clarify our doubts.
Best regards!
Now I understand the functionality of the decorators. Just yesterday I implemented 2 decorators and it has been amazing.
I don't know if they exist in other projects, but the decorators seem to me an excellent idea. They are really very useful. congratulations!
Again, thank you very much for taking the time to answer and clarify our doubts.
Best regards!
Re: Excludes Decorators doesn't work
PSR-7 and Laravel middlewares are in fact decorators too
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star