/** * This method assembles a list of all installed services * * @return string HTML to display */ protected function displayServiceList() { $content = ''; $services = $this->getInstalledServices(); $content .= '<table cellspacing="1" cellpadding="2" border="0" class="tx_sv_reportlist">'; foreach ($services as $serviceType => $installedServices) { $content .= '<tr><td colspan="7">'; $content .= '<h4>' . sprintf($GLOBALS['LANG']->getLL('service_type'), $serviceType) . '</h4>'; $content .= '</td></tr>'; $content .= '<tr class="bgColor2">'; $content .= '<td class="cell">' . $GLOBALS['LANG']->getLL('service') . '</td>'; $content .= '<td class="cell">' . $GLOBALS['LANG']->getLL('priority') . '</td>'; $content .= '<td class="cell">' . $GLOBALS['LANG']->getLL('quality') . '</td>'; $content .= '<td class="cell">' . $GLOBALS['LANG']->getLL('subtypes') . '</td>'; $content .= '<td class="cell">' . $GLOBALS['LANG']->getLL('os') . '</td>'; $content .= '<td class="cell">' . $GLOBALS['LANG']->getLL('externals') . '</td>'; $content .= '<td class="cell">' . $GLOBALS['LANG']->getLL('available') . '</td>'; $content .= '</tr>'; foreach ($installedServices as $serviceKey => $serviceInfo) { $content .= '<tr class="bgColor3-20">'; $cellContent = '<p class="service-header"><span class="service-title">' . $serviceInfo['title'] . '</span> (' . $serviceInfo['extKey'] . ': ' . $serviceKey . ')</p>'; if (!empty($serviceInfo['description'])) { $cellContent .= '<p class="service-description">' . $serviceInfo['description'] . '</p>'; } $content .= '<td class="cell">' . $cellContent . '</td>'; $content .= '<td class="cell">' . $serviceInfo['priority'] . '</td>'; $content .= '<td class="cell">' . $serviceInfo['quality'] . '</td>'; $content .= '<td class="cell">' . (empty($serviceInfo['serviceSubTypes']) ? '-' : implode(', ', $serviceInfo['serviceSubTypes'])) . '</td>'; $content .= '<td class="cell">' . (empty($serviceInfo['os']) ? $GLOBALS['LANG']->getLL('any') : $serviceInfo['os']) . '</td>'; $content .= '<td class="cell">' . (empty($serviceInfo['exec']) ? '-' : $serviceInfo['exec']) . '</td>'; $class = 'typo3-message message-error'; $message = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xml:no'); if (t3lib_extmgm::findService($serviceKey, '*')) { $class = 'typo3-message message-ok'; $message = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xml:yes'); } $content .= '<td class="cell ' . $class . '">' . $message . '</td>'; $content .= '</tr>'; } } $content .= '</table>'; return $content; }
/** * Prints a row with data for the various service listings * * @param string $type: ... * @param string $eKey: ... * @param string $eConf: ... unused * @param array $info: ... * @param array $cells: ... * @param string $bgColor: ... * @param array $inst_list: ... * @param boolean $import: ... * @param string $altLinkUrl: ... * @return string HTML content */ function serviceListRow($type, $eKey, $eConf, $info, $cells, $bgColor = "", $inst_list = array(), $import = 0, $altLinkUrl = '') { $svKey = $info['sv']['serviceKey']; $imgInfo = @getImageSize($this->getExtPath($eKey, $info) . '/ext_icon.gif'); if (is_array($imgInfo)) { $extIcon = '<td valign="top"><img src="' . $GLOBALS['BACK_PATH'] . $this->typeRelPaths[$info['type']] . $eKey . '/ext_icon.gif' . '" ' . $imgInfo[3] . '></td>'; } elseif ($info['_ICON']) { $extIcon = '<td valign="top">' . $info['_ICON'] . '</td>'; } else { $extIcon = '<td><img src="clear.gif" width=1 height=1></td>'; } $bgColor = t3lib_div::modifyHTMLcolor($this->pObj->doc->bgColor4, 20, 20, 20); if ($type === 'typeList') { $bgColor = '#F6CA96'; $cells[] = $extIcon; $title = '<strong>' . $info['sv']['serviceType'] . ' (Service Type)</strong>'; $cells[] = '<td valign="top">' . $title . '<br />' . htmlspecialchars(t3lib_div::fixed_lgd_cs($this->svDef[$info['sv']['serviceType']]['desc'], 400)) . '</td>'; $cells[] = '<td nowrap="nowrap" valign="top"></td>'; $cells[] = '<td nowrap="nowrap" valign="top"></td>'; $cells[] = '<td nowrap="nowrap" valign="top"></td>'; $icon = ''; } else { $cells[] = '<td><img src="clear.gif" width=1 height=1></td>'; $title = '<strong>' . $info['sv']['title'] . '</strong><br />[' . $info['sv']['serviceKey'] . ']'; $cells[] = '<td valign="top">' . $title . '<div style="margin-top:6px;">' . htmlspecialchars(t3lib_div::fixed_lgd_cs($info['sv']['description'], 400)) . '<div></td>'; $cells[] = '<td valign="top">' . implode($info['sv']['serviceSubTypes'], ', ') . '</td>'; $cells[] = '<td nowrap="nowrap" valign="top">' . $info['sv']['os'] . '</td>'; $cells[] = '<td nowrap="nowrap" valign="top">' . $info['sv']['exec'] . '</td>'; if (t3lib_extmgm::findService($svKey, '*')) { $icon = '<img ' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/icon_ok.gif') . ' vspace="4" />'; } else { $icon = '<img ' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/icon_fatalerror.gif') . ' vspace="4" />'; $bgColor = t3lib_div::modifyHTMLcolor($this->pObj->doc->bgColor2, 30, 30, 30); } } $cells[] = '<td nowrap="nowrap" valign="top" align="center">' . $icon . '</td>'; $bgColor = ' bgColor="' . ($bgColor ? $bgColor : $this->pObj->doc->bgColor4) . '"'; return '<tr' . $bgColor . '>' . implode('', $cells) . '</tr>'; }
/** * Renders a single service's row. * * @param string $sericeKey The service key to access the service. * @param array $serviceInformation registration information of the service. * @return string HTML row for the service. */ protected function renderServiceRow($serviceKey, $serviceInformation) { $serviceDescription = ' <p class="service-header"> <span class="service-title">' . $serviceInformation['title'] . '</span> (' . $serviceInformation['extKey'] . ': ' . $serviceKey . ') </p>'; if (!empty($serviceInformation['description'])) { $serviceDescription .= '<p class="service-description">' . $serviceInformation['description'] . '</p>'; } $sericeSubtypes = empty($serviceInformation['serviceSubTypes']) ? '-' : implode(', ', $serviceInformation['serviceSubTypes']); $serviceOperatingSystem = empty($serviceInformation['os']) ? $GLOBALS['LANG']->getLL('any') : $serviceInformation['os']; $serviceRequiredExecutables = empty($serviceInformation['exec']) ? '-' : $serviceInformation['exec']; $serviceAvailabilityClass = 'typo3-message message-error'; $serviceAvailable = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xml:no'); if (t3lib_extmgm::findService($serviceKey, '*')) { $serviceAvailabilityClass = 'typo3-message message-ok'; $serviceAvailable = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xml:yes'); } $serviceRow = ' <tr class="service"> <td class="first-cell ' . $serviceAvailabilityClass . '">' . $serviceDescription . '</td> <td class="cell ' . $serviceAvailabilityClass . '">' . $serviceInformation['priority'] . '</td> <td class="cell ' . $serviceAvailabilityClass . '">' . $serviceInformation['quality'] . '</td> <td class="cell ' . $serviceAvailabilityClass . '">' . $sericeSubtypes . '</td> <td class="cell ' . $serviceAvailabilityClass . '">' . $serviceOperatingSystem . '</td> <td class="cell ' . $serviceAvailabilityClass . '">' . $serviceRequiredExecutables . '</td> <td class="last-cell ' . $serviceAvailabilityClass . '">' . $serviceAvailable . '</td> </tr>'; return $serviceRow; }