Adding a Configuration Options without default Options
Posted: 02 Nov 2019, 13:50
Hello all,
Im searching a better way to do this, maybe you guys can help me.
I wrote a new subpart which has it's own data Domain.
Then i wrote the jsonadm files for it and register these files for my new data Domain under Admin Config File from my extension.
This is working fine via config, but i have to rewrite the default domains and resources.
Means if i update the aimeos lib and you change the default domains im running into an error.
The default domains and ressources, i've found under jsonadm/src/Admin/JsonAdm/Base.php getDomains() and getResources(). These are protected functions which i can't override in my jsonadm child class to dinamically add mynewdatadomain.
Therefore i've done it with the config file but im not really happy with it.
Do you know how i can do it better?
PS: i found nothing in the documentations about admin/jsonadm/domains & admin/jsonadm/resources, maybe i dont found it but i believe its not documented.
Many thanks,
tenkraD
Im searching a better way to do this, maybe you guys can help me.
I wrote a new subpart which has it's own data Domain.
Then i wrote the jsonadm files for it and register these files for my new data Domain under Admin Config File from my extension.
Code: Select all
return[
....
'jsonadm' => [
/**
* admin/jsonadm/domains
* A list of domain names whose clients are available for the JSON API
*/
'domains' => [
/* DEFAULT DOMAINS */
'attribute', 'catalog', 'coupon', 'customer', 'locale', 'media', 'order',
'plugin', 'price', 'product', 'service', 'supplier', 'stock', 'tag', 'text',
/* MY NEW DOMAIN */
'mynewdatadomain'
],
/**
* admin/jsonadm/resources
* A list of additional resources name whose clients are available for the JSON API
*/
'resources' => [
/* DEFAULT Additional RESOURCE */
'coupon/config', 'plugin/config', 'service/config',
/* MY NEW Additional RESOURCE */
'mynewdatadomain/config',
],
....
]
Means if i update the aimeos lib and you change the default domains im running into an error.
The default domains and ressources, i've found under jsonadm/src/Admin/JsonAdm/Base.php getDomains() and getResources(). These are protected functions which i can't override in my jsonadm child class to dinamically add mynewdatadomain.
Therefore i've done it with the config file but im not really happy with it.
Do you know how i can do it better?
PS: i found nothing in the documentations about admin/jsonadm/domains & admin/jsonadm/resources, maybe i dont found it but i believe its not documented.
Many thanks,
tenkraD