Esempio n. 1
0
 /**
  * get available modules
  *
  * @return array
  */
 public function getUmcModules()
 {
     $modules = $this->helpConfig->getConfig('module', true, []);
     $installed = [];
     foreach ($modules as $module) {
         $moduleData = $this->moduleList->getOne($module['id']);
         if ($moduleData) {
             $version = $moduleData['setup_version'];
             if (isset($module['build'])) {
                 $version .= '-' . $module['build'];
             }
             $installed[] = ['module' => $module['id'], 'version' => $version];
         }
     }
     return $installed;
 }
Esempio n. 2
0
 /**
  * get help sections
  *
  * @return array
  */
 public function getSections()
 {
     $sections = [];
     foreach ($this->helpConfig->getConfig('section') as $sectionId => $section) {
         $fieldsets = [];
         foreach ($section['fieldset'] as $fieldsetId => $fieldsetSettings) {
             $columns = [];
             foreach ($fieldsetSettings['columns']['column'] as $columnId => $columnSettings) {
                 $columns[$columnId] = ['label' => $columnSettings['label'], 'key' => $columnSettings['key']];
             }
             if (count($columns)) {
                 $description = isset($fieldsetSettings['description']) ? $fieldsetSettings['description'] : '';
                 $fieldsets[$fieldsetId] = ['label' => $fieldsetSettings['label'], 'description' => $description, 'fields' => $this->getFiedsetValues($fieldsetSettings), 'columns' => $columns];
             }
         }
         $sections[$sectionId] = ['label' => $section['label'], 'description' => isset($section['description']) ? $section['description'] : '', 'fieldsets' => $fieldsets];
     }
     return $sections;
 }