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