/**
  * Generate the summary of the plugins and ctypes report
  *
  * @return string HTML code
  */
 public static function getSummary()
 {
     $plugins = array();
     foreach ($GLOBALS['TCA']['tt_content']['columns']['list_type']['config']['items'] as $itemKey => $itemValue) {
         if (trim($itemValue[1]) != '') {
             $plugins[$itemValue[1]] = $itemValue;
         }
     }
     $ctypes = array();
     foreach ($GLOBALS['TCA']['tt_content']['columns']['CType']['config']['items'] as $itemKey => $itemValue) {
         if ($itemValue[1] != '--div--') {
             $ctypes[$itemValue[1]] = $itemValue;
         }
     }
     $itemsCount = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('COUNT( tt_content.uid ) as "nb"', 'tt_content,pages', 'tt_content.pid=pages.uid AND pages.pid>=0 AND tt_content.hidden=0 ' . 'AND tt_content.deleted=0 AND pages.hidden=0 AND pages.deleted=0');
     $items = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('tt_content.CType,tt_content.list_type,count(*) as "nb"', 'tt_content,pages', 'tt_content.pid=pages.uid AND pages.pid>=0 AND tt_content.hidden=0 ' . 'AND tt_content.deleted=0 AND pages.hidden=0 AND pages.deleted=0', 'tt_content.CType,tt_content.list_type', 'nb DESC');
     $allItems = array();
     foreach ($items as $itemKey => $itemValue) {
         $itemTemp = array();
         if ($itemValue['CType'] == 'list') {
             preg_match('/EXT:(.*?)\\//', $plugins[$itemValue['list_type']][0], $ext);
             preg_match('/^LLL:(EXT:.*?):(.*)/', $plugins[$itemValue['list_type']][0], $llfile);
             $localLang = TYPO3\CMS\Core\Utility\GeneralUtility::readLLfile($llfile[1], $GLOBALS['LANG']->lang);
             if ($plugins[$itemValue['list_type']][2]) {
                 $itemTemp['iconext'] = TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_REQUEST_DIR') . $plugins[$itemValue['list_type']][2];
             } else {
                 $itemTemp['iconext'] = '';
             }
             $itemTemp['content'] = $GLOBALS['LANG']->getLLL($llfile[2], $localLang) . ' (' . $itemValue['list_type'] . ')';
         } else {
             preg_match('/^LLL:(EXT:.*?):(.*)/', $ctypes[$itemValue['CType']][0], $llfile);
             $localLang = TYPO3\CMS\Core\Utility\GeneralUtility::readLLfile($llfile[1], $GLOBALS['LANG']->lang);
             if (is_file(PATH_site . '/typo3/sysext/t3skin/icons/gfx/' . $ctypes[$itemValue['CType']][2])) {
                 $itemTemp['iconext'] = TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_REQUEST_DIR') . 'sysext/t3skin/icons/gfx/' . $ctypes[$itemValue['CType']][2];
             } elseif (preg_match('/^\\.\\./', $ctypes[$itemValue['CType']][2], $temp)) {
                 $itemTemp['iconext'] = TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_REQUEST_DIR') . $ctypes[$itemValue['CType']][2];
             } elseif (preg_match('/^EXT:(.*)$/', $ctypes[$itemValue['CType']][2], $temp)) {
                 $itemTemp['iconext'] = TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_REQUEST_DIR') . '../typo3conf/ext/' . $temp[1];
             } else {
                 $itemTemp['iconext'] = '';
             }
             $itemTemp['content'] = $GLOBALS['LANG']->getLLL($llfile[2], $localLang) . ' (' . $itemValue['CType'] . ')';
         }
         $itemTemp['references'] = $itemValue['nb'];
         $itemTemp['pourc'] = round($itemValue['nb'] * 100 / $itemsCount[0]['nb'], 2);
         $allItems[] = $itemTemp;
     }
     return $allItems;
 }