Skip to content
Snippets Groups Projects
Commit e01501e1 authored by Stefan Galinski's avatar Stefan Galinski :video_game:
Browse files

[BUGFIX] Cleanup / Ensure compat to PHP 7.0

parent df4a3382
No related branches found
No related tags found
No related merge requests found
......@@ -28,7 +28,6 @@ use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;
* The Youtube Controller
*/
class YoutubeController extends ActionController {
/**
* @var YoutubeService
*/
......
......@@ -32,12 +32,12 @@ use InvalidArgumentException;
* Helper functions
*/
class YoutubeService {
protected const API_URL = 'https://www.googleapis.com/youtube/v3/';
protected const API_CHANNEL = 'search';
protected const API_PLAYLIST = 'playlistItems';
protected const API_VIDEO = 'videos';
protected const API_PART = 'snippet';
protected const API_ORDER_BY = 'date';
const API_URL = 'https://www.googleapis.com/youtube/v3/';
const API_CHANNEL = 'search';
const API_PLAYLIST = 'playlistItems';
const API_VIDEO = 'videos';
const API_PART = 'snippet';
const API_ORDER_BY = 'date';
/**
* @param string $youtubeId
......
<T3DataStructure>
<meta>
<langDisable>1</langDisable>
<langChildren>1</langChildren>
</meta>
<sheets>
<meta>
<langDisable>1</langDisable>
<langChildren>1</langChildren>
</meta>
<sheets>
<sDEF>
<ROOT>
<TCEforms>
<sheetTitle>LLL:EXT:sg_youtube/Resources/Private/Language/locallang.xlf:settings
</sheetTitle>
</TCEforms>
<type>array</type>
<el>
<settings.id>
<TCEforms>
<exclude>0</exclude>
<label>LLL:EXT:sg_youtube/Resources/Private/Language/locallang.xlf:id
</label>
<sDEF>
<ROOT>
<TCEforms>
<sheetTitle>LLL:EXT:sg_youtube/Resources/Private/Language/locallang.xlf:settings
</sheetTitle>
</TCEforms>
<type>array</type>
<el>
<settings.id>
<TCEforms>
<exclude>0</exclude>
<label>LLL:EXT:sg_youtube/Resources/Private/Language/locallang.xlf:id
</label>
<config>
<type>input</type>
<size>30</size>
<eval>trim,required</eval>
</config>
</TCEforms>
</settings.id>
<settings.maxResults>
<TCEforms>
<exclude>0</exclude>
<label>LLL:EXT:sg_youtube/Resources/Private/Language/locallang.xlf:maxResults
</label>
</TCEforms>
</settings.id>
<settings.maxResults>
<TCEforms>
<exclude>0</exclude>
<label>LLL:EXT:sg_youtube/Resources/Private/Language/locallang.xlf:maxResults
</label>
<config>
<type>input</type>
<size>30</size>
<default>10</default>
<default>10</default>
<eval>trim,int</eval>
<range>
<lower>1</lower>
<upper>50</upper>
</range>
<range>
<lower>1</lower>
<upper>50</upper>
</range>
</config>
</TCEforms>
</settings.maxResults>
</el>
</ROOT>
</sDEF>
</sheets>
</TCEforms>
</settings.maxResults>
</el>
</ROOT>
</sDEF>
</sheets>
</T3DataStructure>
<?php
/***************************************************************
* Copyright notice
*
* (c) sgalinski Internet Services (https://www.sgalinski.de)
*
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['sgyoutube_youtube'] = 'pi_flexform';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('sgyoutube_youtube', 'FILE:EXT:sg_youtube/Configuration/FlexForms/flexform_sgyoutube_youtube.xml');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue(
'sgyoutube_youtube', 'FILE:EXT:sg_youtube/Configuration/FlexForms/flexform_sgyoutube_youtube.xml'
);
......@@ -3,6 +3,7 @@ plugin.tx_sgyoutube {
# cat=plugin.tx_sgyoutube/file; type=string; label=YouTube API Key
apiKey =
}
view {
# cat=plugin.tx_sgyoutube/file; type=string; label=Path to template root (FE)
templateRootPath = EXT:sg_youtube/Resources/Private/Templates/
......
......@@ -2,15 +2,18 @@ plugin.tx_sgyoutube {
settings {
apiKey = {$plugin.tx_sgyoutube.settings.apiKey}
}
view {
templateRootPaths {
0 = EXT:sg_youtube/Resources/Private/Templates/
1 = {$plugin.tx_sgyoutube.view.templateRootPath}
}
partialRootPaths {
0 = EXT:sg_youtube/Resources/Private/Partials/
1 = {$plugin.tx_sgyoutube.view.partialRootPath}
}
layoutRootPaths {
0 = EXT:sg_youtube/Resources/Private/Layouts/
1 = {$plugin.tx_sgyoutube.view.layoutRootPath}
......
# Ext: sg_youtube
<img src="https://www.sgalinski.de/typo3conf/ext/project_theme/Resources/Public/Images/logo.svg" />
<img alt="" src="https://www.sgalinski.de/typo3conf/ext/project_theme/Resources/Public/Images/logo.svg" />
License: [GNU GPL, Version 2](https://www.gnu.org/licenses/gpl-2.0.html)
......@@ -12,7 +12,7 @@ TYPO3 version: >8.7
## Installation / Integration
First install the extension and activate it in the Extension-Manager.
First install the extension and activate it in the Extension Manager.
### TypoScript integration
......
<div class="tx-sg-youtube">
<f:render section="main"/>
<f:render section="main"/>
</div>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment