Is there an official detailed documentation of the possible nodes,values and attributes than can be found in system.xml?
-
02-03-2021 - |
Question
Is there an official detailed documentation of the possible nodes,values and attributes than can be found in system.xml
I can figure out the meaning of some of them myself, but some of them elude me.
For example why do sections of groups have a type attribute, what else could they be other than text. Mind you that section and groups are not inputs.
What does the canRestore="1" attribute in fields mean?
Who is responsible for interpreting the system.xml information and transforming it into a form?
To get a feeling of what I'm looking please take a look at this documentation of the layout instructions Layout instructions docs
Solution
Welcome to the world of Magento development. A lot is not documented and basically you have to educate yourself with trial and error working towards an answer.
There is no public documentation.
/**
* Check if the field can be restored to default
*
* @return bool
* @since 100.1.0
*/
public function canRestore()
{
return isset($this->_data['canRestore']) && (int)$this->_data['canRestore'];
}
Which is not clear at all.
'can_restore_to_default' => $this->isCanRestoreToDefault($field->canRestore()),
No results
https://github.com/magento/magento2/search?q=RestoreToDefault&unscoped_q=RestoreToDefault
More meaningful results
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<button class="action-tertiary"
click="element.restoreToDefault">
<span translate="'Use Default Value'"></span>
</button>
So it means these config options have the 'Use Default Value' option