private function loadData()
{
// inform that the theme is not installed yet
if (!BackendExtensionsModel::isThemeInstalled($this->currentTheme)) {
$this->warnings[] = array('message' => BL::getMessage('InformationThemeIsNotInstalled'));
}
// path to information file
$pathInfoXml = FRONTEND_PATH . '/Themes/' . $this->currentTheme . '/info.xml';
// information needs to exists
if (is_file($pathInfoXml)) {
try {
// load info.xml
$infoXml = @new \SimpleXMLElement($pathInfoXml, LIBXML_NOCDATA, true);
// convert xml to useful array
$this->information = BackendExtensionsModel::processThemeXml($infoXml);
// empty data (nothing useful)
if (empty($this->information)) {
$this->warnings[] = array('message' => BL::getMessage('InformationFileIsEmpty'));
}
} catch (\Exception $e) {
// warning that the information file is corrupt
$this->warnings[] = array('message' => BL::getMessage('InformationFileCouldNotBeLoaded'));
}
} else {
// warning that the information file is missing
$this->warnings[] = array('message' => BL::getMessage('InformationFileIsMissing'));
}
}