‪TYPO3CMS  ‪main
TYPO3\CMS\Core\Resource\Rendering\YouTubeRenderer Class Reference
Inheritance diagram for TYPO3\CMS\Core\Resource\Rendering\YouTubeRenderer:
TYPO3\CMS\Core\Resource\Rendering\FileRendererInterface TYPO3\CMS\Core\SingletonInterface

Public Member Functions

int getPriority ()
 
bool canRender (FileInterface $file)
 
string render (FileInterface $file, $width, $height, array $options=[])
 

Protected Member Functions

false OnlineMediaHelperInterface getOnlineMediaHelper (FileInterface $file)
 
array collectOptions (array $options, FileInterface $file)
 
string createYouTubeUrl (array $options, FileInterface $file)
 
string getVideoIdFromFile (FileInterface $file)
 
array collectIframeAttributes ($width, $height, array $options)
 
 implodeAttributes (array $attributes)
 
 shouldIncludeFrameBorderAttribute ()
 

Protected Attributes

OnlineMediaHelperInterface false $onlineMediaHelper
 

Detailed Description

YouTube renderer class

Definition at line 29 of file YouTubeRenderer.php.

Member Function Documentation

◆ canRender()

bool TYPO3\CMS\Core\Resource\Rendering\YouTubeRenderer::canRender ( FileInterface  $file)

Check if given File(Reference) can be rendered

Parameters
FileInterface$fileFile of FileReference to render
Returns
‪bool

Implements TYPO3\CMS\Core\Resource\Rendering\FileRendererInterface.

Definition at line 55 of file YouTubeRenderer.php.

References TYPO3\CMS\Core\Resource\Rendering\YouTubeRenderer\getOnlineMediaHelper().

◆ collectIframeAttributes()

array TYPO3\CMS\Core\Resource\Rendering\YouTubeRenderer::collectIframeAttributes (   $width,
  $height,
array  $options 
)
protected
Parameters
int | string$width
int | string$height
Returns
‪array pairs of key/value; not yet html-escaped

Definition at line 182 of file YouTubeRenderer.php.

References TYPO3\CMS\Core\Resource\Rendering\YouTubeRenderer\shouldIncludeFrameBorderAttribute().

Referenced by TYPO3\CMS\Core\Resource\Rendering\YouTubeRenderer\render().

◆ collectOptions()

array TYPO3\CMS\Core\Resource\Rendering\YouTubeRenderer::collectOptions ( array  $options,
FileInterface  $file 
)
protected

◆ createYouTubeUrl()

string TYPO3\CMS\Core\Resource\Rendering\YouTubeRenderer::createYouTubeUrl ( array  $options,
FileInterface  $file 
)
protected

◆ getOnlineMediaHelper()

false OnlineMediaHelperInterface TYPO3\CMS\Core\Resource\Rendering\YouTubeRenderer::getOnlineMediaHelper ( FileInterface  $file)
protected

◆ getPriority()

int TYPO3\CMS\Core\Resource\Rendering\YouTubeRenderer::getPriority ( )

Returns the priority of the renderer This way it is possible to define/overrule a renderer for a specific file type/context. For example create a video renderer for a certain storage/driver type. Should be between 1 and 100, 100 is more important than 1

Returns
‪int

Implements TYPO3\CMS\Core\Resource\Rendering\FileRendererInterface.

Definition at line 44 of file YouTubeRenderer.php.

◆ getVideoIdFromFile()

string TYPO3\CMS\Core\Resource\Rendering\YouTubeRenderer::getVideoIdFromFile ( FileInterface  $file)
protected

◆ implodeAttributes()

TYPO3\CMS\Core\Resource\Rendering\YouTubeRenderer::implodeAttributes ( array  $attributes)
protected

◆ render()

string TYPO3\CMS\Core\Resource\Rendering\YouTubeRenderer::render ( FileInterface  $file,
  $width,
  $height,
array  $options = [] 
)

◆ shouldIncludeFrameBorderAttribute()

TYPO3\CMS\Core\Resource\Rendering\YouTubeRenderer::shouldIncludeFrameBorderAttribute ( )
protected

HTML5 deprecated the "frameborder" attribute as everything should be done via styling.

Definition at line 233 of file YouTubeRenderer.php.

Referenced by TYPO3\CMS\Core\Resource\Rendering\YouTubeRenderer\collectIframeAttributes().

Member Data Documentation

◆ $onlineMediaHelper

OnlineMediaHelperInterface false TYPO3\CMS\Core\Resource\Rendering\YouTubeRenderer::$onlineMediaHelper
protected