‪TYPO3CMS  ‪main
Dimension.php
Go to the documentation of this file.
1 <?php
2 
3 /*
4  * This file is part of the TYPO3 CMS project.
5  *
6  * It is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU General Public License, either version 2
8  * of the License, or any later version.
9  *
10  * For the full copyright and license information, please read the
11  * LICENSE.txt file that was distributed with this source code.
12  *
13  * The TYPO3 project - inspiring people to share!
14  */
15 
17 
22 {
26  protected int ‪$width;
27 
31  protected int ‪$height;
32 
36  public function ‪__construct(IconSize $size = IconSize::MEDIUM)
37  {
38  $dimensions = $size->getDimensions();
39 
40  $this->width = $dimensions[0];
41  $this->height = $dimensions[1];
42  }
43 
44  public function ‪getWidth(): int
45  {
46  return ‪$this->width;
47  }
48 
49  public function ‪getHeight(): int
50  {
51  return ‪$this->height;
52  }
53 }
‪TYPO3\CMS\Core\Imaging
Definition: Dimension.php:16
‪TYPO3\CMS\Core\Imaging\Dimension\getWidth
‪getWidth()
Definition: Dimension.php:44
‪TYPO3\CMS\Core\Imaging\Dimension\$width
‪int $width
Definition: Dimension.php:26
‪TYPO3\CMS\Core\Imaging\Dimension\__construct
‪__construct(IconSize $size=IconSize::MEDIUM)
Definition: Dimension.php:36
‪TYPO3\CMS\Core\Imaging\Dimension\$height
‪int $height
Definition: Dimension.php:31
‪TYPO3\CMS\Core\Imaging\Dimension
Definition: Dimension.php:22
‪TYPO3\CMS\Core\Imaging\Dimension\getHeight
‪getHeight()
Definition: Dimension.php:49