TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Backend\Backend\Avatar\Image Class Reference

Public Member Functions

 __construct ($url, $width, $height)
 
 getUrl ($relativeToCurrentScript=false)
 
 getWidth ()
 
 getHeight ()
 

Protected Attributes

 $url
 
 $width
 
 $height
 

Detailed Description

Class Image

Holds url + dimensions of avatar image

Definition at line 24 of file Image.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Backend\Backend\Avatar\Image::__construct (   $url,
  $width,
  $height 
)

Constructor

Parameters
string$urlurl of image. Needs to be relative to the website root or an absolute URL.
int$widthwidth of image
int$heightheight of image

Definition at line 50 of file Image.php.

References TYPO3\CMS\Backend\Backend\Avatar\Image\$height, TYPO3\CMS\Backend\Backend\Avatar\Image\$url, and TYPO3\CMS\Backend\Backend\Avatar\Image\$width.

Member Function Documentation

◆ getHeight()

TYPO3\CMS\Backend\Backend\Avatar\Image::getHeight ( )

Get height

Returns
int

Definition at line 91 of file Image.php.

References TYPO3\CMS\Backend\Backend\Avatar\Image\$height.

◆ getUrl()

TYPO3\CMS\Backend\Backend\Avatar\Image::getUrl (   $relativeToCurrentScript = false)

Get url

Parameters
bool$relativeToCurrentScriptDetermines whether the URL returned should be relative to the current script, in case it is relative at all.
Returns
string

Definition at line 63 of file Image.php.

References TYPO3\CMS\Backend\Backend\Avatar\Image\$url, TYPO3\CMS\Core\Utility\PathUtility\dirname(), TYPO3\CMS\Core\Utility\PathUtility\getRelativePathTo(), and TYPO3\CMS\Core\Utility\GeneralUtility\isValidUrl().

◆ getWidth()

TYPO3\CMS\Backend\Backend\Avatar\Image::getWidth ( )

Get width

Returns
int

Definition at line 81 of file Image.php.

References TYPO3\CMS\Backend\Backend\Avatar\Image\$width.

Member Data Documentation

◆ $height

TYPO3\CMS\Backend\Backend\Avatar\Image::$height
protected

◆ $url

TYPO3\CMS\Backend\Backend\Avatar\Image::$url
protected

◆ $width

TYPO3\CMS\Backend\Backend\Avatar\Image::$width
protected