TYPO3CMS
9.5
Main Page
Related Pages
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Variables
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
Files
File List
File Members
All
$
d
e
r
u
Functions
Variables
$
e
r
Examples
•
All
Classes
Namespaces
Files
Functions
Variables
Pages
Image.php
Go to the documentation of this file.
1
<?php
2
namespace
TYPO3\CMS\Backend\Backend\Avatar
;
3
4
/*
5
* This file is part of the TYPO3 CMS project.
6
*
7
* It is free software; you can redistribute it and/or modify it under
8
* the terms of the GNU General Public License, either version 2
9
* of the License, or any later version.
10
*
11
* For the full copyright and license information, please read the
12
* LICENSE.txt file that was distributed with this source code.
13
*
14
* The TYPO3 project - inspiring people to share!
15
*/
16
17
use
TYPO3\CMS\Core\Core\Environment
;
18
use
TYPO3\CMS\Core\Utility\GeneralUtility
;
19
use
TYPO3\CMS\Core\Utility\PathUtility
;
20
25
class
Image
26
{
32
protected
$url
;
33
37
protected
$width
;
38
42
protected
$height
;
43
49
public
function
__construct
(
$url
,
$width
,
$height
)
50
{
51
$this->url =
$url
;
52
$this->width = (int)
$width
;
53
$this->height = (int)
$height
;
54
}
55
62
public
function
getUrl
($relativeToCurrentScript =
false
)
63
{
64
$url
=
$this->url
;
65
if
($relativeToCurrentScript && !GeneralUtility::isValidUrl(
$url
)) {
66
$url
=
PathUtility::getAbsoluteWebPath
(
Environment::getPublicPath
() .
'/'
.
$url
);
67
}
68
return
$url
;
69
}
70
74
public
function
getWidth
()
75
{
76
return
$this->width
;
77
}
78
82
public
function
getHeight
()
83
{
84
return
$this->height
;
85
}
86
}
TYPO3\CMS\Core\Utility\PathUtility
Definition:
PathUtility.php:23
TYPO3\CMS\Core\Core\Environment\getPublicPath
static string getPublicPath()
Definition:
Environment.php:153
TYPO3\CMS\Backend\Backend\Avatar\Image\getHeight
int getHeight()
Definition:
Image.php:79
TYPO3\CMS\Backend\Backend\Avatar\Image\getUrl
string getUrl($relativeToCurrentScript=false)
Definition:
Image.php:59
TYPO3\CMS\Backend\Backend\Avatar\Image\__construct
__construct($url, $width, $height)
Definition:
Image.php:46
TYPO3\CMS\Backend\Backend\Avatar\Image\$url
string $url
Definition:
Image.php:31
TYPO3\CMS\Backend\Backend\Avatar\Image\$width
int $width
Definition:
Image.php:35
TYPO3\CMS\Backend\Backend\Avatar\Image\$height
int $height
Definition:
Image.php:39
TYPO3\CMS\Backend\Backend\Avatar
Definition:
Avatar.php:3
TYPO3\CMS\Backend\Backend\Avatar\Image\getWidth
int getWidth()
Definition:
Image.php:71
TYPO3\CMS\Core\Core\Environment
Definition:
Environment.php:39
TYPO3\CMS\Backend\Backend\Avatar\Image
Definition:
Image.php:26
TYPO3\CMS\Core\Utility\GeneralUtility
Definition:
GeneralUtility.php:45
TYPO3\CMS\Core\Utility\PathUtility\getAbsoluteWebPath
static string getAbsoluteWebPath($targetPath)
Definition:
PathUtility.php:42
doxygen
typo3
sysext
backend
Classes
Backend
Avatar
Image.php
Generated on Tue Oct 5 2021 01:56:49 for TYPO3CMS by
1.8.18