本文整理汇总了PHP中TYPO3\CMS\Core\Utility\CommandUtility::getPaths方法的典型用法代码示例。如果您正苦于以下问题:PHP CommandUtility::getPaths方法的具体用法?PHP CommandUtility::getPaths怎么用?PHP CommandUtility::getPaths使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TYPO3\CMS\Core\Utility\CommandUtility
的用法示例。
在下文中一共展示了CommandUtility::getPaths方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: renderExecutablesSearchPathList
/**
* This method assembles a list of all defined executables search paths
*
* @return string HTML to display
*/
protected function renderExecutablesSearchPathList()
{
$searchPaths = CommandUtility::getPaths(TRUE);
$content = '<h3>' . $this->getLanguageService()->getLL('search_paths') . '</h3>';
if (empty($searchPaths)) {
$content .= '<p>' . $this->getLanguageService()->getLL('no_search_paths') . '</p>';
} else {
$content .= '
<table class="table table-striped table-hover tx_sv_reportlist">
<thead>
<tr>
<td>' . $this->getLanguageService()->getLL('path') . '</td>
<td>' . $this->getLanguageService()->getLL('valid') . '</td>
</tr>
</thead>
<tbody>';
foreach ($searchPaths as $path => $isValid) {
$pathAccessibleClass = 'danger';
$pathAccessible = $this->getLanguageService()->sL('LLL:EXT:lang/locallang_common.xlf:no');
if ($isValid) {
$pathAccessibleClass = 'success';
$pathAccessible = $this->getLanguageService()->sL('LLL:EXT:lang/locallang_common.xlf:yes');
}
$content .= '
<tr class="' . $pathAccessibleClass . '">
<td class="first-cell">' . GeneralUtility::fixWindowsFilePath($path) . '</td>
<td class="last-cell">' . $pathAccessible . '</td>
</tr>';
}
$content .= '
</tbody>
</table>';
}
return $content;
}
示例2: renderExecutablesSearchPathList
/**
* This method assembles a list of all defined executables search paths
*
* @return string HTML to display
*/
protected function renderExecutablesSearchPathList()
{
$searchPaths = \TYPO3\CMS\Core\Utility\CommandUtility::getPaths(TRUE);
$content = '<br /><h3 class="divider">' . $GLOBALS['LANG']->getLL('search_paths') . '</h3>';
if (count($searchPaths) == 0) {
$content .= '<p>' . $GLOBALS['LANG']->getLL('no_search_paths') . '</p>';
} else {
$content .= '
<table cellspacing="1" cellpadding="2" border="0" class="tx_sv_reportlist paths">
<thead>
<tr class="t3-row-header">
<td>' . $GLOBALS['LANG']->getLL('path') . '</td>
<td>' . $GLOBALS['LANG']->getLL('valid') . '</td>
</tr>
</thead>
<tbody>';
foreach ($searchPaths as $path => $isValid) {
$pathAccessibleClass = 'typo3-message message-error';
$pathAccessible = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xml:no');
if ($isValid) {
$pathAccessibleClass = 'typo3-message message-ok';
$pathAccessible = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xml:yes');
}
$content .= '
<tr>
<td class="first-cell ' . $pathAccessibleClass . '">' . \TYPO3\CMS\Core\Utility\GeneralUtility::fixWindowsFilePath($path) . '</td>
<td class="last-cell ' . $pathAccessibleClass . '">' . $pathAccessible . '</td>
</tr>';
}
$content .= '
</tbody>
</table>';
}
return $content;
}