‪TYPO3CMS  10.4
ThumbnailConfiguration.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 /*
6  * This file is part of the TYPO3 CMS project.
7  *
8  * It is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU General Public License, either version 2
10  * of the License, or any later version.
11  *
12  * For the full copyright and license information, please read the
13  * LICENSE.txt file that was distributed with this source code.
14  *
15  * The TYPO3 project - inspiring people to share!
16  */
17 
19 
22 
27 {
31  protected ‪$width = 64;
32 
36  protected ‪$height = 64;
37 
38  public function ‪__construct()
39  {
40  $userTsConfig = $this->‪getBackendUser()->‪getTSConfig();
41  $this->width = (int)($userTsConfig['options.']['file_list.']['thumbnail.']['width'] ?? 64);
42  $this->height = (int)($userTsConfig['options.']['file_list.']['thumbnail.']['height'] ?? 64);
43  }
44 
48  public function ‪getWidth(): int
49  {
50  return ‪$this->width;
51  }
52 
56  public function ‪getHeight(): int
57  {
58  return ‪$this->height;
59  }
60 
64  protected function ‪getBackendUser()
65  {
66  return ‪$GLOBALS['BE_USER'];
67  }
68 }
‪TYPO3\CMS\Filelist\Configuration\ThumbnailConfiguration
Definition: ThumbnailConfiguration.php:27
‪TYPO3\CMS\Filelist\Configuration\ThumbnailConfiguration\getHeight
‪int getHeight()
Definition: ThumbnailConfiguration.php:54
‪TYPO3\CMS\Filelist\Configuration\ThumbnailConfiguration\$height
‪int $height
Definition: ThumbnailConfiguration.php:34
‪TYPO3\CMS\Core\Authentication\BackendUserAuthentication\getTSConfig
‪array getTSConfig()
Definition: BackendUserAuthentication.php:1217
‪TYPO3\CMS\Filelist\Configuration\ThumbnailConfiguration\getWidth
‪int getWidth()
Definition: ThumbnailConfiguration.php:46
‪TYPO3\CMS\Filelist\Configuration\ThumbnailConfiguration\__construct
‪__construct()
Definition: ThumbnailConfiguration.php:36
‪TYPO3\CMS\Filelist\Configuration
Definition: ThumbnailConfiguration.php:18
‪TYPO3\CMS\Core\Authentication\BackendUserAuthentication
Definition: BackendUserAuthentication.php:62
‪TYPO3\CMS\Filelist\Configuration\ThumbnailConfiguration\$width
‪int $width
Definition: ThumbnailConfiguration.php:30
‪TYPO3\CMS\Core\SingletonInterface
Definition: SingletonInterface.php:23
‪$GLOBALS
‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']
Definition: ext_localconf.php:5
‪TYPO3\CMS\Filelist\Configuration\ThumbnailConfiguration\getBackendUser
‪BackendUserAuthentication getBackendUser()
Definition: ThumbnailConfiguration.php:62