42 lines
1.2 KiB
PHP
42 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace HermannTelser\Zuladungsliste\Bootstrap;
|
|
|
|
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
|
use TYPO3\CMS\Core\Database\ConnectionPool;
|
|
use HermannTelser\Zuladungsliste\Utilities\Message;
|
|
|
|
/***
|
|
*
|
|
* This file is part of the "Zuladungsliste Steiermark" Extension for TYPO3 CMS.
|
|
*
|
|
* For the full copyright and license information, please read the
|
|
* LICENSE.txt file that was distributed with this source code.
|
|
*
|
|
* (c) 2019 Hermann Telser <hermann.telser@gmail.com>, NUH-Odds GmbH
|
|
*
|
|
***/
|
|
|
|
class KammerById
|
|
{
|
|
/**
|
|
* @param mixed $kammerid
|
|
*
|
|
* @return string
|
|
*/
|
|
public static function load($kammerid = 0)
|
|
{
|
|
if ($kammerid == 0) {
|
|
Message::warning(__file__, __line__, "KammerID fehlt");
|
|
}
|
|
|
|
$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getConnectionForTable('tx_zuladungsliste_domain_model_kammern')->createQueryBuilder();
|
|
$statement = $queryBuilder->select('bezeichnung')->from('tx_zuladungsliste_domain_model_kammern')
|
|
->where($queryBuilder->expr()->in('uid', $kammerid))
|
|
->execute();
|
|
while ($row = $statement->fetch()) {
|
|
return $row['bezeichnung'];
|
|
}
|
|
}
|
|
}
|