Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
sg_youtube
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TYPO3
sg_youtube
Commits
5dfc080a
Verified
Commit
5dfc080a
authored
1 year ago
by
Kevin Ditscheid
Browse files
Options
Downloads
Plain Diff
[TASK] Merge branch master
parents
1a48311f
0391c867
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!12
Upgrade typo3v12 phase3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Classes/ViewHelpers/StructuredVideoDataViewHelper.php
+5
-7
5 additions, 7 deletions
Classes/ViewHelpers/StructuredVideoDataViewHelper.php
Configuration/Icons.php
+2
-2
2 additions, 2 deletions
Configuration/Icons.php
with
7 additions
and
9 deletions
Classes/ViewHelpers/StructuredVideoDataViewHelper.php
+
5
−
7
View file @
5dfc080a
...
...
@@ -30,8 +30,6 @@ use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractTagBasedViewHelper;
/**
* Class StructuredVideoDataViewHelper
*
* @package SGalinski\SgYoutube\ViewHelpers
*/
class
StructuredVideoDataViewHelper
extends
AbstractTagBasedViewHelper
{
/**
...
...
@@ -47,8 +45,8 @@ class StructuredVideoDataViewHelper extends AbstractTagBasedViewHelper {
*/
public
function
initializeArguments
():
void
{
parent
::
initializeArguments
();
$this
->
registerArgument
(
'videoArray'
,
'array'
,
'An array of videos'
,
TRUE
);
$this
->
registerArgument
(
'arrayType'
,
'string'
,
'Either "youtube" or "vimeo"'
,
FALSE
,
"
youtube
"
);
$this
->
registerArgument
(
'videoArray'
,
'array'
,
'An array of videos'
,
TRUE
,
[]
);
$this
->
registerArgument
(
'arrayType'
,
'string'
,
'Either "youtube" or "vimeo"'
,
FALSE
,
'
youtube
'
);
}
/**
...
...
@@ -58,11 +56,11 @@ class StructuredVideoDataViewHelper extends AbstractTagBasedViewHelper {
*/
public
function
render
():
string
{
$this
->
escapeOutput
=
FALSE
;
$videoArray
=
$this
->
arguments
[
'videoArray'
];
$arrayType
=
$this
->
arguments
[
'arrayType'
];
$videoArray
=
$this
->
arguments
[
'videoArray'
]
??
[]
;
$arrayType
=
$this
->
arguments
[
'arrayType'
]
??
'youtube'
;
$structuredData
=
[];
if
(
$arrayType
===
"
youtube
"
)
{
if
(
$arrayType
===
'
youtube
'
)
{
foreach
(
$videoArray
as
$video
)
{
$structuredData
[]
=
[
'@type'
=>
'VideoObject'
,
...
...
This diff is collapsed.
Click to expand it.
Configuration/Icons.php
+
2
−
2
View file @
5dfc080a
<?php
use
TYPO3\CMS\Core\Imaging\IconProvider\
Svg
IconProvider
;
use
TYPO3\CMS\Core\Imaging\IconProvider\
Bitmap
IconProvider
;
/**
* Important! Do not return a variable named $icons, because it will result in an error.
...
...
@@ -11,7 +11,7 @@ use TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider;
$iconList
=
[];
foreach
([
'extension-sg_youtube'
=>
'sg-youtube.png'
]
as
$identifier
=>
$path
)
{
$iconList
[
$identifier
]
=
[
'provider'
=>
Svg
IconProvider
::
class
,
'provider'
=>
Bitmap
IconProvider
::
class
,
'source'
=>
'EXT:sg_youtube/Resources/Public/Icons/'
.
$path
,
];
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment