Commit 9f36bb25 authored by Thomas Löffler's avatar Thomas Löffler

Merge branch 'TYPO3V9/ter_fe2' into task/update-solr

parents d67a854c 41f5c4b9
......@@ -19,7 +19,7 @@ return [
'label_userFunc' => 'EXT:ter/class.tx_ter_tcaLabel.php:tx_ter_tcaLabel->getExtensionKey',
'default_sortby' => 'ORDER BY extensionuid',
'title' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensiondetails',
'iconfile' => \TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix(ExtensionManagementUtility::extPath($extensionKey)) . 'tx_ter_extensiondetails.gif',
'iconfile' => \TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($extensionKey)) . 'tx_ter_extensiondetails.gif',
'dividers2tabs' => true,
],
'interface' => [
......
......@@ -20,7 +20,7 @@ return [
'tstamp' => 'tstamp',
'crdate' => 'crdate',
'title' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensionkeys',
'iconfile' => \TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix(ExtensionManagementUtility::extPath($extensionKey)) . 'tx_ter_extensionkeys.gif',
'iconfile' => \TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($extensionKey)) . 'tx_ter_extensionkeys.gif',
'dividers2tabs' => true,
],
'interface' => [
......
......@@ -18,7 +18,7 @@ return [
'label' => 'extensionkey',
'default_sortby' => 'ORDER BY extensionkey',
'title' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensionmembers',
'iconfile' => \TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix(ExtensionManagementUtility::extPath($extensionKey)) . 'tx_ter_extensionmembers.gif',
'iconfile' => \TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($extensionKey)) . 'tx_ter_extensionmembers.gif',
'dividers2tabs' => true,
],
'interface' => [
......
......@@ -21,7 +21,7 @@ return [
'tstamp' => 'tstamp',
'delete' => 'deleted',
'title' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensionqueue',
'iconfile' => \TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix(ExtensionManagementUtility::extPath($extensionKey)) . 'tx_ter_extensionqueue.gif',
'iconfile' => \TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($extensionKey)) . 'tx_ter_extensionqueue.gif',
'dividers2tabs' => true,
],
'interface' => [
......
......@@ -20,7 +20,7 @@ return [
'tstamp' => 'tstamp',
'crdate' => 'crdate',
'title' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensions',
'iconfile' => \TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix(ExtensionManagementUtility::extPath($extensionKey)) . 'tx_ter_extensions.gif',
'iconfile' => \TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($extensionKey)) . 'tx_ter_extensions.gif',
'dividers2tabs' => true,
],
'interface' => [
......
......@@ -7,7 +7,7 @@ if (!defined('TYPO3_MODE')) {
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist'][$_EXTKEY . '_pi1'] = 'layout,select_key,pages,recursive';
// Add plugin and datasets
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(['TER SOAP Server', $_EXTKEY . '_pi1']);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(['TER SOAP Server', $_EXTKEY . '_pi1'], 'list_type', $_EXTKEY);
// Add static configuration files
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'resources/static/', 'TER Server');
......@@ -14,6 +14,8 @@ namespace T3o\TerFe2\ViewHelpers;
* The TYPO3 project - inspiring people to share!
*/
use T3o\TerFe2\Domain\Model\Version;
/**
* Extension icon view helper
*/
......@@ -48,19 +50,17 @@ class ExtensionIconViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractT
parent::initializeArguments();
$this->registerUniversalTagAttributes();
$this->registerTagAttribute('alt', 'string', 'Specifies an alternate text for an image', true);
$this->registerArgument('version', Version::class, 'Version of extension', true);
}
/**
* Renders an extension icon for given version object
*
* @param \T3o\TerFe2\Domain\Model\Version $version Version object
* @return string Rendered image tag
*/
public function render(\T3o\TerFe2\Domain\Model\Version $version = null)
public function render()
{
if ($version === null) {
$version = $this->renderChildren();
}
$version = $this->arguments['version'];
$imageUrl = '';
$provider = $version->getExtensionProvider();
......
<?php
namespace T3o\TerFe2\ViewHelpers;
/*
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
/**
* Format view helper
*/
class FormatViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper
{
/**
* Disable the escaping interceptor
*/
protected $escapingInterceptorEnabled = false;
/**
* Formats content with given function
*
* @param string $function Function to format the content
* @param mixed $content Content
* @return string Formated content
* @throws \Exception
*/
public function render($function, $content = null)
{
if ($content === null) {
$content = $this->renderChildren();
}
if (empty($function) || !function_exists($function)) {
throw new \Exception('Function "' . $function . '" not found to modify content');
}
if (!is_string($content) && !is_array($content)) {
throw new \Exception('"' . ucfirst(gettype($content)) . '" is not an allowed type in format view helper');
}
if (is_array($content)) {
return call_user_func_array($function, $content);
}
return call_user_func($function, $content);
}
}
......@@ -18,7 +18,7 @@
</f:if>
</f:if>
<f:if condition="{relation.isSystem}">
<terfe2:format function="strtoupper">{relation.relationKey}</terfe2:format>
<f:format.case mode="upper">{relation.relationKey}</f:format.case>
<f:if condition="{relation.versionString}"> ({relation.versionString})</f:if>
</f:if>
<f:if condition="{relation.isCore}">
......
......@@ -6,8 +6,8 @@
<f:if condition="{extension}">
<f:then>
<tl:metaTag property="og:title" content="{extension.lastVersion.title} ({extension.extKey})" />
<tl:metaTag property="og:description" content="{extension.lastVersion.description}" />
<tl:metaTag property="name" name="og:title" content="{extension.lastVersion.title} ({extension.extKey})" />
<tl:metaTag property="name" name="og:description" content="{extension.lastVersion.description}" />
<tl:titleTag>{extension.lastVersion.title} ({extension.extKey})</tl:titleTag>
<f:security.ifHasRole role="{settings.reviewerGroupUid}">
<div class="alert alert-info mb-3" role="alert">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment