MidCOM Component Configuration
From OpenPSA Wiki
MidCOM Components can be configured per Sitegroup in a special Snippetdir called sitegroup-config. To configure a Component, a Subsnippetdir with the name of the component has to be created. Alternatively, sitegroup-wide component configuration can be done in Asgard. Configuration on a per-Topic-level can be done in a MidCOM Toolbar (in versions before 2.5, this was handled by MidCOM AIS).
In classes derived from the MidCOM Component Base Classes, the current configuration is available in the attribute _config:
$show_archive = $this->_config->get('show_archive');
The same information is available in the Component's Style Elements:
$show_archive = $data['config']->get('show_archive');
To access config information from outside the component source or from DBA classes, it is available in the GLOBALS PHP Superglobal:
$component_data = $GLOBALS['midcom_component_data']['net.nehmer.blog']; $show_archive = $component_data['config']->get('show_archive');
